Skip to content

Commit

Permalink
ci: skip PR comment for PRs from forks
Browse files Browse the repository at this point in the history
...because they don't have the required write permission.
  • Loading branch information
stempler committed May 22, 2024
1 parent d43f58b commit 3149a02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

permissions:
contents: read
pull-requests: write
pull-requests: write # Note: Write permissions cannot be granted from forks (only works for private repos requiring enabling a related setting)

concurrency:
group: artifacts-${{ github.ref }}
Expand Down Expand Up @@ -111,6 +111,7 @@ jobs:
retention-days: 14

- name: Find artifact comment if it exists
if: "! github.event.pull_request.head.repo.fork " # Only run with write permissions
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: find-comment
with:
Expand All @@ -120,6 +121,7 @@ jobs:
body-includes: "hale studio builds for this pull request:"

- name: Comment with links to artifacts
if: "! github.event.pull_request.head.repo.fork " # Only run with write permissions
id: comment-plan
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
Expand Down

0 comments on commit 3149a02

Please sign in to comment.