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