Update Phrases #6
This file contains 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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | |
name: Update Phrases | |
on: workflow_dispatch | |
jobs: | |
phrases: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Set commit account information | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Installations | |
run: | | |
npm ci | |
- name: Decrypt credentials | |
run: | | |
gpg --quiet --batch --yes --passphrase="${{secrets.google_api_pw}}" \ | |
--output i18n/credentials.json \ | |
--decrypt i18n/credentials.json.gpg | |
- name: Fetch and update phrases | |
continue-on-error: true | |
run: | | |
npm run phrases | |
npx prettier --write src/i18n/schema.js | |
npx prettier --write src/i18n/phrases.js | |
git status | |
git add src/i18n/schema.js | |
git add src/i18n/phrases.js | |
git commit -m 'github action: update phrases' --no-verify | |
git remote set-url origin https://x-access-token:${{secrets.ci_token}}@github.com/EasyEyes/remote-calibrator | |
git push |