Skip to content

(U) 🧰 Update Language Packs #4

(U) 🧰 Update Language Packs

(U) 🧰 Update Language Packs #4

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