|
5 | 5 | - cron: "0 9 * * 3"
|
6 | 6 | workflow_dispatch:
|
7 | 7 |
|
| 8 | +env: |
| 9 | + LTS_BRANCH: i18n-ja-release-8.5 |
| 10 | + CLOUD_BRANCH: i18n-ja-release-8.1 |
| 11 | + |
8 | 12 | jobs:
|
9 | 13 | ja:
|
10 | 14 | runs-on: ubuntu-latest
|
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + branch: [${{ env.LTS_BRANCH }}, ${{ env.CLOUD_BRANCH }}] |
11 | 18 |
|
12 | 19 | steps:
|
| 20 | + - name: Skip duplicate branch |
| 21 | + if: ${{ matrix.branch == env.LTS_BRANCH && env.LTS_BRANCH == env.CLOUD_BRANCH }} |
| 22 | + run: echo "Skipping duplicate branch ${{ matrix.branch }}" |
| 23 | + continue-on-error: true |
| 24 | + |
13 | 25 | - uses: actions/checkout@v4
|
14 | 26 | name: Download translator repo
|
15 | 27 | with:
|
|
18 | 30 | - uses: actions/checkout@v4
|
19 | 31 | name: Download docs repo and specified branch
|
20 | 32 | with:
|
21 |
| - ref: "i18n-ja-release-8.1" |
| 33 | + ref: "${{ matrix.branch }}" |
22 | 34 | path: "docs"
|
23 | 35 | - uses: actions/setup-node@v4
|
24 | 36 | name: Setup node 18
|
|
63 | 75 | git commit -m "update translated files"
|
64 | 76 | git push
|
65 | 77 |
|
| 78 | + - name: trigger docs-staging workflow |
| 79 | + run: | |
| 80 | + curl \ |
| 81 | + -X POST \ |
| 82 | + -H "Accept: application/vnd.github+json" \ |
| 83 | + -H "Authorization: token ${{ secrets.DOCS_STAGING }}" \ |
| 84 | + https://api.github.com/repos/pingcap/docs-staging/actions/workflows/update.yml/dispatches \ |
| 85 | + -d '{"ref":"main","inputs":{"full": "false", "repo":"${{ github.repository }}","branch":"${{ matrix.branch }}"}}' |
| 86 | +
|
| 87 | +
|
66 | 88 | # When ja-kernal version is different with cloud, open the comment and run the github action!
|
67 | 89 | # ja-cloud:
|
68 | 90 | # runs-on: ubuntu-latest
|
@@ -120,16 +142,16 @@ jobs:
|
120 | 142 | # git add .
|
121 | 143 | # git commit -m "update translated files"
|
122 | 144 | # git push
|
123 |
| - dispatch: |
124 |
| - runs-on: ubuntu-latest |
125 |
| - needs: [ja] |
| 145 | + # dispatch: |
| 146 | + # runs-on: ubuntu-latest |
| 147 | + # needs: [ja] |
126 | 148 |
|
127 |
| - steps: |
128 |
| - - name: trigger docs-staging workflow |
129 |
| - run: | |
130 |
| - curl \ |
131 |
| - -X POST \ |
132 |
| - -H "Accept: application/vnd.github+json" \ |
133 |
| - -H "Authorization: token ${{ secrets.DOCS_STAGING }}" \ |
134 |
| - https://api.github.com/repos/pingcap/docs-staging/actions/workflows/update.yml/dispatches \ |
135 |
| - -d '{"ref":"main","inputs":{"full": "false", "repo":"${{ github.repository }}","branch":"i18n-ja-release-8.1"}}' |
| 149 | + # steps: |
| 150 | + # - name: trigger docs-staging workflow |
| 151 | + # run: | |
| 152 | + # curl \ |
| 153 | + # -X POST \ |
| 154 | + # -H "Accept: application/vnd.github+json" \ |
| 155 | + # -H "Authorization: token ${{ secrets.DOCS_STAGING }}" \ |
| 156 | + # https://api.github.com/repos/pingcap/docs-staging/actions/workflows/update.yml/dispatches \ |
| 157 | + # -d '{"ref":"main","inputs":{"full": "false", "repo":"${{ github.repository }}","branch":"i18n-ja-release-8.1"}}' |
0 commit comments