From 97c0f6448507baec20cd5e4f391a8af73def9817 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Fri, 16 Aug 2024 06:49:04 +0200 Subject: [PATCH] fix(actions): fix crowdin action, use bot to create pr --- .../workflows/docs-localization-download.yml | 80 +++++++++---------- .../workflows/docs-localization-upload.yml | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/docs-localization-download.yml b/.github/workflows/docs-localization-download.yml index b535f7d12b..5fbd76b95f 100644 --- a/.github/workflows/docs-localization-download.yml +++ b/.github/workflows/docs-localization-download.yml @@ -57,7 +57,7 @@ jobs: base_path: "." commit_message: "docs: Update localizations from Crowdin" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} - name: "Convert Outputs" @@ -88,46 +88,46 @@ jobs: PR_ID=$(echo -n "${{ needs.download.outputs.pr_id }}" | base64 --decode) echo "pr_ref=$PR_REF" >> $GITHUB_OUTPUT echo "pr_id=$PR_ID" >> $GITHUB_OUTPUT - - name: Invoke checks workflow - uses: benc-uk/workflow-dispatch@v1.2.4 - with: - workflow: check.yml - ref: ${{ steps.convert_outputs.outputs.pr_ref }} - - name: Invoke codeql workflow - uses: benc-uk/workflow-dispatch@v1.2.4 - with: - workflow: codeql-analysis.yml - ref: ${{ steps.convert_outputs.outputs.pr_ref }} - - name: Invoke lint workflow - uses: benc-uk/workflow-dispatch@v1.2.4 - with: - workflow: lint.yml - ref: ${{ steps.convert_outputs.outputs.pr_ref }} - - name: Invoke pr workflow - uses: benc-uk/workflow-dispatch@v1.2.4 - with: - workflow: pr.yml - ref: ${{ steps.convert_outputs.outputs.pr_ref }} - - name: Invoke test workflow - uses: benc-uk/workflow-dispatch@v1.2.4 - with: - workflow: test.yml - ref: ${{ steps.convert_outputs.outputs.pr_ref }} - - name: Invoke todo workflow - uses: benc-uk/workflow-dispatch@v1.2.4 - with: - workflow: todo.yml - ref: ${{ steps.convert_outputs.outputs.pr_ref }} - - name: Invoke version updates workflow - uses: benc-uk/workflow-dispatch@v1.2.4 - with: - workflow: version-updates.yml - ref: ${{ steps.convert_outputs.outputs.pr_ref }} - # - run: gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID" - # env: - # PR_ID: ${{ steps.convert_outputs.outputs.pr_id }} - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + #- name: Invoke checks workflow + #uses: benc-uk/workflow-dispatch@v1.2.4 + #with: + #workflow: check.yml + #ref: ${{ steps.convert_outputs.outputs.pr_ref }} + #- name: Invoke codeql workflow + #uses: benc-uk/workflow-dispatch@v1.2.4 + #with: + #workflow: codeql-analysis.yml + #ref: ${{ steps.convert_outputs.outputs.pr_ref }} + #- name: Invoke lint workflow + #uses: benc-uk/workflow-dispatch@v1.2.4 + #with: + #workflow: lint.yml + #ref: ${{ steps.convert_outputs.outputs.pr_ref }} + #- name: Invoke pr workflow + #uses: benc-uk/workflow-dispatch@v1.2.4 + #with: + #workflow: pr.yml + #ref: ${{ steps.convert_outputs.outputs.pr_ref }} + #- name: Invoke test workflow + #uses: benc-uk/workflow-dispatch@v1.2.4 + #with: + #workflow: test.yml + #ref: ${{ steps.convert_outputs.outputs.pr_ref }} + #- name: Invoke todo workflow + #uses: benc-uk/workflow-dispatch@v1.2.4 + #with: + #workflow: todo.yml + #ref: ${{ steps.convert_outputs.outputs.pr_ref }} + #- name: Invoke version updates workflow + #uses: benc-uk/workflow-dispatch@v1.2.4 + #with: + #workflow: version-updates.yml + #ref: ${{ steps.convert_outputs.outputs.pr_ref }} - run: gh pr merge --auto --squash $PR_ID + env: + PR_ID: ${{ steps.convert_outputs.outputs.pr_id }} + GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} + - run: gh pr review --approve -b "auto-approval for localization sync :3" "$PR_ID" env: PR_ID: ${{ steps.convert_outputs.outputs.pr_id }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docs-localization-upload.yml b/.github/workflows/docs-localization-upload.yml index 942fcb3200..59b7153384 100644 --- a/.github/workflows/docs-localization-upload.yml +++ b/.github/workflows/docs-localization-upload.yml @@ -47,6 +47,6 @@ jobs: create_pull_request: false config: "crowdin.yml" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}