New Crowdin translations by GitHub Action #8865
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "En_GBLocalise in translations v5" | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- l10n_crowdin_package_v5 | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
engb-localise: | |
runs-on: ubuntu-latest | |
permissions: read-all | |
steps: | |
- name: Checkout Source Code | |
uses: actions/checkout@v4 | |
- name: Check PR content Joomla 5 | |
id: build-v5 | |
run: | | |
mkdir ${{ github.workspace}}/logs | |
cd ${{ github.workspace}}/joomla_v5/translations/package | |
grep -rn --include \*.php 'En_GBLocalise' | tee ${{ github.workspace}}/logs/en_gblocalise_result | |
cd ${{ github.workspace}} | |
cat ${{ github.workspace}}/logs/en_gblocalise_result | wc -l | tee ${{ github.workspace}}/logs/files_affected | |
awk -F/ '{ print $1 }' ${{ github.workspace}}/logs/en_gblocalise_result | sort -u | wc -l | tee ${{ github.workspace}}/logs/languagepacks_affected | |
aflp=$(head -n 1 ${{ github.workspace}}/logs/languagepacks_affected) | |
affi=$(head -n 1 ${{ github.workspace}}/logs/files_affected) | |
echo -n "$aflp" > ${{ github.workspace}}/logs/languagepacks_affected | |
echo -n "$affi" > ${{ github.workspace}}/logs/files_affected | |
echo -n "v5" > ${{ github.workspace}}/logs/jversion | |
cat ${{ github.workspace}}/logs/en_gblocalise_result | |
- name: Save PR number | |
if: ${{ always() }} | |
run: | | |
echo -n ${{ github.event.pull_request.number }} | tee ${{ github.workspace}}/logs/pr_number | |
[ -s ${{ github.workspace}}/logs/pr_number ] || gh pr list --limit 1 --repo joomla/core-translations --author app/github-actions --state open --json number --jq .[].number > ${{ github.workspace}}/logs/pr_number | |
prnumber=$(head -n 1 ${{ github.workspace}}/logs/pr_number) | |
echo -n "$prnumber" > ${{ github.workspace}}/logs/pr_number | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Save PR sha | |
if: ${{ always() }} | |
run: echo ${{ github.sha }} | tee ${{ github.workspace}}/logs/pr_sha | |
- name: fail workflow | |
run: | | |
if [ -s ${{ github.workspace}}/logs/en_gblocalise_result ]; then | |
exit 1 | |
fi | |
- name: Upload En_GBLocalise-logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: En_GBLocalise-logs | |
path: ${{ github.workspace}}/logs | |