From 3b3a4a69cf63047575ccdec22f1d2e6cb7472659 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 19 Sep 2024 12:07:05 +0100 Subject: [PATCH 1/2] Backport workflow: try using the app token GITHUB_TOKEN is no longer defined; we should use either the workflow token or the app one. Here we try using the app one. --- .github/workflows/update-release-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index 7b6f31c26d..7d1f745ed8 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -134,7 +134,7 @@ jobs: echo SOURCE_BRANCH=${SOURCE_BRANCH} echo TARGET_BRANCH=${TARGET_BRANCH} python .github/update-release-branch.py \ - --github-token ${GITHUB_TOKEN} \ + --github-token ${{ steps.app-token.outputs.token }} \ --repository-nwo ${{ github.repository }} \ --source-branch ${SOURCE_BRANCH} \ --target-branch ${TARGET_BRANCH} \ From 7513a95cdc963825d775381a1a0e0f7e3ff98dbd Mon Sep 17 00:00:00 2001 From: Remco Vermeulen Date: Thu, 19 Sep 2024 08:28:19 -0700 Subject: [PATCH 2/2] Use workflow token for `update-release-branch.py` This explicitly passes the workflow token and restores this to the original invocation. The split is now App token for `git` and workflow token for everything else. --- .github/workflows/update-release-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index 7d1f745ed8..2418fee447 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -134,7 +134,7 @@ jobs: echo SOURCE_BRANCH=${SOURCE_BRANCH} echo TARGET_BRANCH=${TARGET_BRANCH} python .github/update-release-branch.py \ - --github-token ${{ steps.app-token.outputs.token }} \ + --github-token ${{ secrets.GITHUB_TOKEN }} \ --repository-nwo ${{ github.repository }} \ --source-branch ${SOURCE_BRANCH} \ --target-branch ${TARGET_BRANCH} \