-
Notifications
You must be signed in to change notification settings - Fork 194
54 lines (45 loc) · 1.48 KB
/
daily-tx-pull.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
name: Daily TX Pull
on:
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
schedule:
# daily-tx-pull (e.g., daily at 3 AM UTC)
- cron: "0 3 * * *"
concurrency:
group: "${{ github.workflow }}"
cancel-in-progress: true
permissions:
contents: write # publish a GitHub release
pages: write # deploy to GitHub Pages
issues: write # comment on released issues
pull-requests: write # comment on released pull requests
jobs:
daily-tx-pull:
runs-on: ubuntu-latest
env:
# Organization-wide secrets
TX_TOKEN: ${{ secrets.TX_TOKEN }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
cache: "npm"
node-version-file: ".nvmrc"
- name: Install dependencies
run: npm ci
- name: Pull editor and www translations
run: |
npm run pull:editor
npm run pull:www
npm run test
- name: Commit translation updates
id: commit
run: |
git config --global user.email $(git log --pretty=format:"%ae" -n1)
git config --global user.name $(git log --pretty=format:"%an" -n1)
git add .
if git diff --cached --exit-code --quiet; then
echo "Nothing to commit."
else
git commit -m "fix: pull new editor translations from Transifex"
git push
fi