-
-
Notifications
You must be signed in to change notification settings - Fork 23
47 lines (41 loc) · 1.3 KB
/
update-langpack.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
name: (U) 🧰 Update Language Packs
on:
workflow_dispatch:
jobs:
update-language-packs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global init.defaultBranch main
git config --global fetch.prune true
- name: Setup git-cinnabar 🪛
run: |
mkdir ~/tools
cd ~/tools
git clone https://github.com/glandium/git-cinnabar.git
cd git-cinnabar
git checkout 0.5.11
export PATH=~/tools/git-cinnabar:$PATH
cd ~
git cinnabar download
- name: Update Language packs
run: |
export PATH=~/tools/git-cinnabar:$PATH
chmod +x ./update-langpack.sh
for lang in $(cat ./supported-languages); do
./update-langpack.sh $lang
done
- name: Commit changes
run: |
git add .
if git diff-index --quiet HEAD --; then
echo "No changes to commit"
else
git commit -m "[bot] Update Language packs"
git push
fi