Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Commit b17fa89

Browse files
committed
publish-preview: Always check out, all the time
`gh` wants to be run within a repo, even if we are simply reading info about a pull request.
1 parent 4545f3f commit b17fa89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/publish-preview.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ jobs:
1010
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot publish-preview') }}
1111
runs-on: ubuntu-latest
1212
permissions:
13+
contents: read
1314
pull-requests: read
1415
outputs:
1516
IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }}
1617
steps:
18+
- uses: actions/checkout@v4
1719
- name: Determine whether this PR is from a fork
1820
id: is-fork
1921
run: echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT"
@@ -28,8 +30,10 @@ jobs:
2830
if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
2931
runs-on: ubuntu-latest
3032
permissions:
33+
contents: read
3134
pull-requests: write
3235
steps:
36+
- uses: actions/checkout@v4
3337
- name: React to the comment
3438
run: |
3539
gh api \

0 commit comments

Comments
 (0)