diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 11cac507..a288eb67 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -1,7 +1,7 @@ name: Create EAS Preview on: - pull_request: + pull_request_target: permissions: contents: read @@ -9,10 +9,13 @@ permissions: jobs: preview: + if: contains(github.event.pull_request.labels.*.name, 'run-preview') runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v5 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Setup Node.js uses: actions/setup-node@v4