OneSky Translation PR #30
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
name: OneSky Translation PR | |
on: | |
schedule: | |
# Run every day at 10:50am UTC (5:50am EST). To avoid delays and possibly dropped jobs GitHub | |
# recommends not scheduling jobs at the top of the hour. | |
- cron: '50 10 * * *' | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
jobs: | |
download: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .tool-versions | |
- name: 📦 Install Dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: 🌐 Extract Translations | |
run: yarn extract | |
- name: ⛅🔽 OneSky Download | |
env: | |
ONESKY_API_KEY: ${{ secrets.ONESKY_API_KEY }} | |
ONESKY_API_SECRET: ${{ secrets.ONESKY_API_SECRET }} | |
ONESKY_PROJECT_ID: ${{ secrets.ONESKY_PROJECT_ID }} | |
run: yarn onesky:download | |
- name: 🔀 Create PR | |
uses: peter-evans/create-pull-request@v7 | |
env: | |
# Disable git hooks because we are only modifying translation files | |
HUSKY: 0 | |
with: | |
branch: bot-update-translations | |
add-paths: | | |
public/locales/ | |
# Sign commits so that the author is a bot | |
sign-commits: true | |
commit-message: Run `yarn extract` and `yarn onesky:download` | |
title: '[no-Jira] Update translations' | |
body: | | |
Update translations with the latest labels extracted from the components and downloaded from OneSky. | |
Due to GitHub Actions restrictions, our `on: pull_request` CI workflow will not run automatically because this PR was created by a bot. To get it to run, a human will have to push a commit to the branch. | |
```sh | |
$ git switch bot-update-translations | |
$ git commit --allow-empty --message "Bump CI" | |
$ git push | |
``` |