From c3b5b2f5a8e07b8b4fb767e9f7c0e070a9d1d95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cem=20K=C4=B1ray?= Date: Mon, 3 Jun 2024 10:55:25 +0200 Subject: [PATCH 1/3] Update pr-preview.yml to add required permissions --- .github/workflows/pr-preview.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 6ff4439..d79b3d3 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -10,6 +10,9 @@ on: concurrency: preview-${{ github.ref }} +permissions: + contents: write + jobs: deploy-preview: runs-on: ubuntu-latest From b9e29e4c1f7c5944cbe60ad184b1b988e52cedce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cem=20K=C4=B1ray?= Date: Mon, 3 Jun 2024 11:00:23 +0200 Subject: [PATCH 2/3] Add `pull-request:write` permission to pr preview workflow --- .github/workflows/pr-preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index d79b3d3..c8048f0 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -12,6 +12,7 @@ concurrency: preview-${{ github.ref }} permissions: contents: write + pull-requests: write jobs: deploy-preview: From aaeb36c33523dfcd642e647af2145e699da5916c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cem=20K=C4=B1ray?= Date: Mon, 3 Jun 2024 11:04:13 +0200 Subject: [PATCH 3/3] Add explanation for permissions in workflow --- .github/workflows/pr-preview.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index c8048f0..fdf4767 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -11,7 +11,9 @@ on: concurrency: preview-${{ github.ref }} permissions: + # Used by `pr-preview-action` to push pr preview build files to related branch contents: write + # Used by `pr-preview-action` to leave a comment on the PR with the preview link pull-requests: write jobs: