-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.51 KB
/
pull-translations.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
57
name: Pull translations from transifex
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
pull_translations:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Max fetch depth (full history of files)
- name: Install transifex client
run: |
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
- name: Pull translations
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: |
./tx pull --all --use-git-timestamps
- name: Get list of changed files
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "CHANGED<<$EOF" >> "$GITHUB_ENV"
git status --porcelain | head -10 >> "$GITHUB_ENV"
echo "$EOF" >> "$GITHUB_ENV"
- name: Push changes to the repository
uses: EndBug/[email protected]
with:
author_name: github-actions[bot]
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: |
Pull translations from transifex
Changed files (at most 10):
${{ env.CHANGED }}
trigger-translation-artifacts-autobuild:
runs-on: ubuntu-latest
needs: pull_translations
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REPOSITORY_DISPATCH_PAT }}
repository: dfint/autobuild
event-type: update