From cf8306207a36bea3ec77f92033857b83d5213d6e Mon Sep 17 00:00:00 2001 From: Mix <32300164+mnixry@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:59:34 +0800 Subject: [PATCH] Add support for additional pull request events --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30943b8..efd8640 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,11 @@ name: CI on: push: + branches-ignore: + - "!renovate/**" + - "!dependabot/**" pull_request_target: + types: [opened, synchronize, reopened] workflow_dispatch: env: @@ -13,6 +17,8 @@ jobs: build: runs-on: ubuntu-latest + if: "${{ github.event_name != 'push' || !startsWith(github.ref, 'refs/pull/') }}" + permissions: id-token: write @@ -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 @@ -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 }}