-
Notifications
You must be signed in to change notification settings - Fork 17
38 lines (33 loc) · 1.05 KB
/
format_i18n.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
on:
workflow_call:
workflow_dispatch:
name: format_i18n
jobs:
format_i18n:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# token with write permissions to protected branches
# standard github token does not allow this
token: ${{ secrets.RELEASE_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 'v20.x'
cache: 'yarn'
- run: yarn
- run: yarn build:i18n:generate-testing
- name: add and commit any files that have changed
id: add_and_commit
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
message: '🤖 GITHUB ACTIONS i18n generator'
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: cancel run if commit is done so the second run is used
run: |
if ${{ steps.add_and_commit.outputs.committed }};then
gh run cancel ${{ github.run_id }}
fi
env:
GH_TOKEN: ${{ github.token }}