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