.github/workflows/i18n.yml #11
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: "[i18n] Update translations" | |
on: | |
# allow running manually | |
workflow_dispatch: | |
# run weekly | |
schedule: | |
- cron: '30 5 1 * *' | |
jobs: | |
i18n: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
branch: | |
- 'master' | |
- 'stable-4.5' | |
- 'stable-4.6' | |
- 'stable-4.7' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ matrix.branch }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
- name: Update apt | |
run: sudo apt -y update | |
- name: Install LDAP requirements | |
run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools | |
- name: Upgrade pip | |
run: pip install pip --upgrade | |
- name: Install galaxy_ng editable | |
run: pip install -e . | |
- name: Extract strings | |
run: | | |
cd galaxy_ng | |
django-admin makemessages --all | |
- name: Clear fuzzy entries | |
run: bash .github/workflows/scripts/clear_fuzzy_entries.sh | |
- name: Compile strings | |
run: | | |
cd galaxy_ng | |
django-admin compilemessages | |
- name: Set current date as env variable | |
run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
committer: ansible <[email protected]> | |
author: ansible <[email protected]> | |
commit-message: | | |
Automated updated of i18n strings on ${{ env.NOW }} | |
No-Issue | |
body: | | |
No-Issue | |
title: "[i18n] Update translations ${{ env.NOW }}" | |
branch: i18n/${{ matrix.branch }}/update-translations-${{ env.NOW }} | |
base: ${{ matrix.branch }} |