Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Localization Update | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'loc/**' | |
| push: # Temporarily add this | |
| branches: | |
| - users/priyanshu/loc-workflow | |
| jobs: | |
| update-localization: | |
| name: Update Localization Files | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.head_ref }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Run Translations Import | |
| run: npm run translations-import | |
| - name: Check for Changes | |
| id: git-check | |
| shell: pwsh | |
| run: | | |
| git add -A | |
| git diff --staged --quiet | |
| if ($LASTEXITCODE -eq 0) { | |
| echo "changes=false" >> $env:GITHUB_OUTPUT | |
| } else { | |
| echo "changes=true" >> $env:GITHUB_OUTPUT | |
| } | |
| - name: Commit and Push Changes | |
| if: steps.git-check.outputs.changes == 'true' | |
| run: | | |
| git config --local user.name "github-actions[bot]" | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -m "Automated localization update from CI" -a | |
| git push |