Merge pull request #41 from podverse/chore/billing-membership-misc #5
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: i18n Sync | |
| on: | |
| push: | |
| branches: [develop] | |
| paths: | |
| - "apps/web/i18n/originals/en-US.json" | |
| - "apps/management-web/i18n/originals/en-US.json" | |
| - "packages/helpers-i18n/i18n/originals/en-US.json" | |
| concurrency: | |
| group: push-${{ github.ref_name }} | |
| cancel-in-progress: false | |
| jobs: | |
| sync: | |
| if: "!contains(github.event.head_commit.message, '[bot]')" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - name: Pin npm version | |
| run: npm install -g npm@11.13.0 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Sync originals from en-US | |
| run: npm run i18n:sync | |
| - name: Compile i18n | |
| run: npm run i18n:compile | |
| - name: Validate i18n | |
| run: npm run i18n:validate | |
| - name: Commit and push if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add apps/web/i18n/originals/ apps/web/i18n/overrides/ | |
| git add apps/management-web/i18n/originals/ apps/management-web/i18n/overrides/ | |
| git add packages/helpers-i18n/i18n/originals/ packages/helpers-i18n/i18n/overrides/ | |
| if git diff --staged --quiet; then | |
| echo "No i18n changes" | |
| else | |
| git commit --no-verify -m "chore: sync i18n keys from en-US [bot]" | |
| git pull --rebase origin develop || true | |
| git push --no-verify origin develop | |
| fi |