Skip to content

Commit

Permalink
[workflow][skip ci] Queue the translation workflows (backport #5143) (#…
Browse files Browse the repository at this point in the history
…5147)

[workflow] Queue the translation workflows (#5143)

* [workflow] Queue the translation workflows

* Update translations.yml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* push needs update job

* Revert "Update translations.yml"

This reverts commit b53b769.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit dfe85f9)

Co-authored-by: Hailin Wang <[email protected]>
  • Loading branch information
mergify[bot] and haiiliin authored Sep 14, 2023
1 parent 840968c commit 10b261b
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
name: Translations

on:
push:
branches:
- "20**"
paths:
- "src/**"
- "docs/source/**"
- "docs/update-locale.sh"
- ".github/workflows/translations.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
update:
strategy:
fail-fast: true
matrix:
version:
["2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023"]
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
Expand All @@ -36,17 +34,37 @@ jobs:
- name: Update translations
run: sh docs/update-locale.sh
env:
version: ${{ github.ref_name }}
version: ${{ matrix.version }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
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"]
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: abqpy-locale-${{ matrix.version }}
path: locale
- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
with:
source-directory: docs/source/locale/${{ github.ref_name }}
source-directory: locale
destination-github-username: "haiiliin"
destination-repository-name: "abqpy-locale"
target-directory: ${{ github.ref_name }}
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
Expand Down

0 comments on commit 10b261b

Please sign in to comment.