From 40f3ffced89d439ab0dd7bd77f5837eeae2be05c Mon Sep 17 00:00:00 2001 From: Super Zheng Date: Mon, 16 Jan 2023 14:33:54 +0800 Subject: [PATCH] feat(workflows): use classic PAT instead of Github App Token --- .github/workflows/gh_pr_auto_updater.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gh_pr_auto_updater.yml b/.github/workflows/gh_pr_auto_updater.yml index a888d5cf9..4b3da1afe 100644 --- a/.github/workflows/gh_pr_auto_updater.yml +++ b/.github/workflows/gh_pr_auto_updater.yml @@ -11,16 +11,14 @@ jobs: if: github.repository == 'Tencent/Hippy' runs-on: ubuntu-latest steps: - - name: Token - uses: navikt/github-app-token-generator@v1 - id: get-token - with: - private-key: ${{ secrets.ACTION_PRIVATE_KEY }} - app-id: ${{ secrets.ACTION_APP_ID }} - name: Updater uses: actions/github-script@v6.3.3 with: - github-token: ${{ steps.get-token.outputs.token }} + # Because the Github App Token, Github Token, and Fine-grained PAT + # cannot obtain the permission to update the workflow files in the head branch, + # so use classic PAT to avoid failures caused by modification of workflow files. + # TODO: use Github App Token or Github Token if permission is granted in the future. + github-token: ${{ secrets.BOT_PAT }} script: | const { pulls, repos } = github.rest;