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 cf83062
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: CI

on:
push:
branches-ignore:
- "!renovate/**"
- "!dependabot/**"
pull_request_target:
types: [opened, synchronize, reopened]
workflow_dispatch:

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

if: "${{ github.event_name != 'push' || !startsWith(github.ref, 'refs/pull/') }}"

permissions:
id-token: write

Expand Down Expand Up @@ -69,7 +75,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 +100,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 cf83062

Please sign in to comment.