Fixup for color_checks TTT #83
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: Update template.pot | |
on: | |
push: | |
branches: [dev] | |
permissions: | |
contents: write | |
jobs: | |
update_pot: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout commit | |
uses: actions/checkout@v4 | |
with: | |
# We need full history for the rebase we'll be doing | |
fetch-depth: 0 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
architecture: 'x64' | |
- name: Restore dependencies cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-update_pot-${{ hashFiles('requirements-scripts.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-update_pot- | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip setuptools wheel | |
python -m pip install -r requirements-scripts.txt | |
- name: Rebase weblate-in | |
run: | | |
git config --local user.name "wryebot" | |
git config --local user.email "[email protected]" | |
git switch weblate-in | |
echo "[!] If the following fails, you will have to manually rebase weblate-in branch on dev, resolve conflicts and force-push it" | |
git rebase origin/dev | |
- name: Update template.pot | |
run: | | |
python scripts/update_l10n_template.py | |
- name: Push updated template.pot | |
run: | | |
# Don't mind these failing, we want to push regardless cause there may | |
# have been translation updates pushed to dev (which would not | |
# register here, but should get to weblate) | |
git commit -a -m "Update template.pot" -m "Corresponds to ${GITHUB_SHA}." || true | |
git push --force-with-lease origin weblate-in || true |