diff --git a/.gitea/workflows/pull_request.yaml b/.gitea/workflows/pull_request.yaml index e4ea9ea..a3ba6a3 100644 --- a/.gitea/workflows/pull_request.yaml +++ b/.gitea/workflows/pull_request.yaml @@ -126,7 +126,8 @@ jobs: git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.41.0-x64 flutter pub get - + - name: Generate localizations + run: flutter gen-l10n --no-use-deferred-loading - name: Check generated files id: generate_localizations @@ -141,23 +142,27 @@ jobs: if: steps.generate_localizations.outputs.has_changes == 'true' env: GITEA_TOKEN: ${{ secrets.BOT_TOKEN }} + BRANCH_NAME: ${{ gitea.head_ref }} run: | - - git fetch origin ${{ gitea.head_ref }} - git checkout ${{ gitea.head_ref }} + git fetch origin "$BRANCH_NAME" + git checkout "$BRANCH_NAME" if [ -n "$(git status --porcelain lib test)" ]; 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 ${{ gitea.head_ref }} + git pull origin "$BRANCH_NAME" git add lib/l10n git commit -m "Generated localizations [skip ci]" - git push origin HEAD:${{ gitea.head_ref }} + git push origin "HEAD:$BRANCH_NAME" else echo "No changes to commit" fi - # git fetch origin ${{ gitea.ref_name }} - # git checkout ${{ gitea.ref_name }} - # git pull origin ${{ gitea.ref_name }} - # git push origin HEAD:${{ gitea.ref_name }} + + + + +# git fetch origin ${{ gitea.ref_name }} +# git checkout ${{ gitea.ref_name }} +# git pull origin ${{ gitea.ref_name }} +# git push origin HEAD:${{ gitea.ref_name }}