From a097fd7cf972483df4fac6bb1c40e16f884f9220 Mon Sep 17 00:00:00 2001 From: Ana Lemos Date: Tue, 25 Apr 2023 10:29:47 -0300 Subject: [PATCH 1/4] fix: add correct permissions to update PR and cancel the action --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ef25372..1375f890 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,9 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + pull-requests: write + actions: write steps: - uses: actions/checkout@v3 From 5a5807c255c11a7641dd13cec472c084e757a6db Mon Sep 17 00:00:00 2001 From: Ana Lemos Date: Tue, 25 Apr 2023 10:58:44 -0300 Subject: [PATCH 2/4] fix: remove actions permission and move permissions to specific step that needs it --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1375f890..90f52005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,6 @@ on: jobs: build: runs-on: ubuntu-latest - permissions: - pull-requests: write - actions: write steps: - uses: actions/checkout@v3 @@ -21,6 +18,8 @@ jobs: uses: dependabot/fetch-metadata@v1 - name: Check if it is a dependency that should be managed by Expo + permissions: + pull-requests: write if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' uses: actions/github-script@v6 with: From fb177c721b8e4217c5e85b736c3cc70442d74b0a Mon Sep 17 00:00:00 2001 From: Ana Lemos Date: Tue, 25 Apr 2023 11:08:29 -0300 Subject: [PATCH 3/4] fix: move permission to jobs --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90f52005..388fa096 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - uses: actions/checkout@v3 @@ -18,8 +20,6 @@ jobs: uses: dependabot/fetch-metadata@v1 - name: Check if it is a dependency that should be managed by Expo - permissions: - pull-requests: write if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' uses: actions/github-script@v6 with: From 1fcf04c219c5b4b26159e5375d65069a01ee1487 Mon Sep 17 00:00:00 2001 From: Ana Lemos Date: Tue, 25 Apr 2023 11:38:34 -0300 Subject: [PATCH 4/4] fix: identation and add actions permission --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 388fa096..1375f890 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,8 @@ jobs: build: runs-on: ubuntu-latest permissions: - pull-requests: write + pull-requests: write + actions: write steps: - uses: actions/checkout@v3