Fixed pipeline
All checks were successful
All checks were successful
This commit is contained in:
@@ -126,13 +126,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Sort .arb-Files
|
- name: Sort .arb-Files
|
||||||
run: |
|
run: |
|
||||||
for file in lib/l10n/intl_*.arb; do
|
shopt -s nullglob
|
||||||
if [ -f "$file" ]; then
|
for file in lib/l10n/arb/app_*.arb; do
|
||||||
echo "Sorting $file"
|
echo "Sorting $file"
|
||||||
dart run arb_utils sort $file
|
dart run arb_utils sort "$file"
|
||||||
exit 1
|
done
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Check for changes
|
- name: Check for changes
|
||||||
id: check_changes
|
id: check_changes
|
||||||
@@ -143,7 +141,7 @@ jobs:
|
|||||||
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Commit generated localizations
|
- name: Commit sorted .arb-Files
|
||||||
if: steps.check_changes.outputs.has_changes == 'true'
|
if: steps.check_changes.outputs.has_changes == 'true'
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||||
@@ -152,13 +150,13 @@ jobs:
|
|||||||
git fetch origin "$BRANCH_NAME"
|
git fetch origin "$BRANCH_NAME"
|
||||||
git checkout "$BRANCH_NAME"
|
git checkout "$BRANCH_NAME"
|
||||||
|
|
||||||
if [ -n "$(git status --porcelain lib test)" ]; then
|
if [ -n "$(git status --porcelain lib/l10n/arb)" ]; then
|
||||||
git config --global user.name "Gitea Actions [bot]"
|
git config --global user.name "Gitea Actions [bot]"
|
||||||
git config --global user.email "actions@yannick-weigert.de"
|
git config --global user.email "actions@yannick-weigert.de"
|
||||||
git config pull.rebase false
|
git config pull.rebase false
|
||||||
git pull origin "$BRANCH_NAME"
|
git pull origin "$BRANCH_NAME"
|
||||||
git add lib/l10n
|
git add lib/l10n/arb
|
||||||
git commit -m "Generated localizations [skip ci]"
|
git commit -m "Sort .arb files [skip ci]"
|
||||||
git push origin "HEAD:$BRANCH_NAME"
|
git push origin "HEAD:$BRANCH_NAME"
|
||||||
else
|
else
|
||||||
echo "No changes to commit"
|
echo "No changes to commit"
|
||||||
|
|||||||
Reference in New Issue
Block a user