Skip to content

Commit

Permalink
Add support for additional pull request events
Browse files Browse the repository at this point in the history
  • Loading branch information
mnixry committed Feb 27, 2024
1 parent 90e718c commit f7db684
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
on:
push:
pull_request_target:
types: [opened, synchronize, reopened]
workflow_dispatch:

env:
Expand All @@ -13,6 +14,8 @@ jobs:
build:
runs-on: ubuntu-latest

if: '!startsWith(github.ref, "refs/pull/")'

permissions:
id-token: write

Expand Down Expand Up @@ -69,7 +72,8 @@ jobs:
runs-on: ubuntu-latest
needs: build

if: github.event_name != 'push' || !startsWith(github.event.pull_request.head.ref, 'ref/pull/')
permissions:
pull-requests: write

steps:
- uses: actions/checkout@v4
Expand All @@ -93,6 +97,7 @@ jobs:
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-comment: ${{ github.event_name == 'pull_request_target' }}
vercel-args: ${{ env.CHECKOUT_ENV == 'production' && '--prod' || ''}}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}

0 comments on commit f7db684

Please sign in to comment.