-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (51 loc) · 1.91 KB
/
onesky.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
```