Skip to content

Translations

Translations #521

Workflow file for this run

name: Translations
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
update:
strategy:
fail-fast: true
matrix:
version:
- "2016"
- "2017"
- "2018"
- "2019"
- "2020"
- "2021"
- "2022"
- "2023"
- "2024"
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
ref: ${{ matrix.version }}
fetch-depth: 0
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: pip install .[dev,docs]
- name: Update submodules
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Update translations
run: sh docs/update-locale.sh
env:
version: ${{ matrix.version }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: abqpy-locale-${{ matrix.version }}
path: docs/source/locale/${{ matrix.version }}
push:
needs: update
strategy:
fail-fast: true
max-parallel: 1
matrix:
version:
- "2016"
- "2017"
- "2018"
- "2019"
- "2020"
- "2021"
- "2022"
- "2023"
- "2024"
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: abqpy-locale-${{ matrix.version }}
path: locale
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
with:
source-directory: locale
destination-github-username: "haiiliin"
destination-repository-name: "abqpy-locale"
target-directory: ${{ matrix.version }}
user-name: github-actions[bot]
user-email: github-actions[bot]@users.noreply.github.com
commit-message: See ORIGIN_COMMIT from $GITHUB_REF
target-branch: main