(U) 🧰 Update Language Packs #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |