This commit is contained in:
2026-01-17 19:56:59 +01:00
parent b5453d9ced
commit bfb5debbeb

View File

@@ -82,10 +82,12 @@ jobs:
run: flutter pub get run: flutter pub get
- name: Check code format - name: Check code format
id: check_format
continue-on-error: true
run: flutter analyze lib test run: flutter analyze lib test
- name: Format code - name: Format code
if: failure() if: steps.check_format.outcome == 'failure'
run: | run: |
git fetch origin ${{ gitea.head_ref }} git fetch origin ${{ gitea.head_ref }}
git checkout ${{ gitea.head_ref }} git checkout ${{ gitea.head_ref }}
@@ -94,11 +96,14 @@ jobs:
dart fix --apply test dart fix --apply test
if [ -n "$(git status --porcelain lib test)" ]; then if [ -n "$(git status --porcelain lib test)" ]; then
git config --global user.name "liquid-actions[bot]" git config --global user.name "Gitea Actions [bot]"
git config --global user.email "gitea@liquid-dev.de" git config --global user.email "actions@gitea.com"
git add lib test git add lib test
git commit -m "Auto-format code" git commit -m "Auto-format code"
git push git push
else else
echo "No changes to commit" echo "No changes to commit"
fi fi
- name: Verify format
run: flutter analyze lib test