From ed17e23f84829b3ac423122b2e2420556ca3e1b1 Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Fri, 7 Jun 2024 15:19:03 -0600 Subject: [PATCH] Run publish-preview on forks --- .github/workflows/publish-preview.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/publish-preview.yml b/.github/workflows/publish-preview.yml index 3dcce39e9a..b17d18fd3a 100644 --- a/.github/workflows/publish-preview.yml +++ b/.github/workflows/publish-preview.yml @@ -5,28 +5,11 @@ on: types: created jobs: - is-fork-pull-request: - name: Determine whether this issue comment was on a pull request from a fork - if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot publish-preview') }} - runs-on: ubuntu-latest - outputs: - IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }} - steps: - - uses: actions/checkout@v4 - - name: Determine whether this PR is from a fork - id: is-fork - run: echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.issue.number }} - publish-preview: name: Publish build preview - needs: is-fork-pull-request permissions: pull-requests: write - # This ensures we don't publish on forks. We can't trust forks with this token. - if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }} + if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot publish-preview') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4