test gen l10n
All checks were successful
Pull Request Pipeline / lint (pull_request) Has been skipped
Pull Request Pipeline / test (pull_request) Has been skipped
Pull Request Pipeline / localizations (pull_request) Has been skipped
Pull Request Pipeline / generate_localizations (pull_request) Successful in 25s
All checks were successful
Pull Request Pipeline / lint (pull_request) Has been skipped
Pull Request Pipeline / test (pull_request) Has been skipped
Pull Request Pipeline / localizations (pull_request) Has been skipped
Pull Request Pipeline / generate_localizations (pull_request) Successful in 25s
This commit is contained in:
@@ -59,6 +59,7 @@ jobs:
|
||||
run: flutter test
|
||||
|
||||
localizations:
|
||||
if: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -100,3 +101,60 @@ jobs:
|
||||
|
||||
echo "All messages translated."
|
||||
|
||||
|
||||
|
||||
generate_localizations:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Required for Flutter action
|
||||
- name: Install jq
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y jq
|
||||
|
||||
- name: Set up Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
flutter-version: 3.41.0
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.41.0-x64
|
||||
flutter pub get
|
||||
|
||||
|
||||
- name: Generate localization files
|
||||
run: flutter gen-l10n --no-use-deferred-loading
|
||||
|
||||
- name: Check code format
|
||||
id: generate_localizations
|
||||
continue-on-error: true
|
||||
run: flutter gen-l10n --no-use-deferred-loading
|
||||
|
||||
- name: Format code
|
||||
if: steps.generate_localizations.outcome == 'failure'
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.BOT_TOKEN }}
|
||||
run: |
|
||||
# git fetch origin ${{ gitea.ref_name }}
|
||||
git fetch origin ${{ gitea.head_ref }}
|
||||
# git checkout ${{ gitea.ref_name }}
|
||||
git checkout ${{ gitea.head_ref }}
|
||||
|
||||
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.ref_name }}
|
||||
git pull origin ${{ gitea.head_ref }}
|
||||
git add lib/l10n
|
||||
git commit -m "Generated localizations [skip ci]"
|
||||
# git push origin HEAD:${{ gitea.ref_name }}
|
||||
git push origin HEAD:${{ gitea.head_ref }}
|
||||
else
|
||||
echo "No changes to commit"
|
||||
fi
|
||||
Reference in New Issue
Block a user