From d33e1b1b242f0a1eef1d1675d39b28bf80a0d572 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Sun, 10 Sep 2023 20:12:38 +0100 Subject: [PATCH] approved-for-ci-run.yml: use token to checkout the repo (#5266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem Another thing I overlooked regarding'approved-for-ci-run`: - When we create a PR, the action is associated with @vipvap and this triggers the pipeline — this is good. - When we update the PR by force-pushing to the branch, the action is associated with @github-actions, which doesn't trigger a pipeline — this is bad. Initially spotted in #5239 / #5211 ([link](https://github.com/neondatabase/neon/actions/runs/6122249456/job/16633919558?pr=5239)) — `check-permissions` should not fail. ## Summary of changes - Use `CI_ACCESS_TOKEN` to check out the repo (I expect this token will be reused in the following `git push`) --- .github/workflows/approved-for-ci-run.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/approved-for-ci-run.yml b/.github/workflows/approved-for-ci-run.yml index 17c42db0d2..e1c491b67c 100644 --- a/.github/workflows/approved-for-ci-run.yml +++ b/.github/workflows/approved-for-ci-run.yml @@ -54,6 +54,7 @@ jobs: - uses: actions/checkout@v3 with: ref: main + token: ${{ secrets.CI_ACCESS_TOKEN }} - run: gh pr checkout "${PR_NUMBER}"