From 6765f4d03abcbd5ea38e46a79e4b077d0fb3098f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20M=C5=82odzikowski?= Date: Wed, 28 Jun 2023 15:05:41 +0200 Subject: [PATCH] feat: add logic for testing against pull_request_target --- .github/workflows/ci-cd-trigger.yml | 4 ++-- .github/workflows/publish-dist.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-cd-trigger.yml b/.github/workflows/ci-cd-trigger.yml index 9ae7a075e..47f7b4a9b 100644 --- a/.github/workflows/ci-cd-trigger.yml +++ b/.github/workflows/ci-cd-trigger.yml @@ -49,7 +49,7 @@ jobs: lint-pr-title: needs: node-modules - if: ${{ github.event_name == 'pull_request' }} + if: ${{ ( github.event_name == 'pull_request' || github.event_name == 'pull_request_target' ) }} name: Verify PR title uses: ./.github/workflows/lint-pr.yml secrets: inherit @@ -225,7 +225,7 @@ jobs: needs: - publish-dist - lint-test-build - if: ${{ github.event_name == 'pull_request' }} + if: ${{ ( github.event_name == 'pull_request' || github.event_name == 'pull_request_target' ) }} timeout-minutes: 60 name: '(CD) comment preview links' steps: diff --git a/.github/workflows/publish-dist.yml b/.github/workflows/publish-dist.yml index 1533b5b47..68adbadc1 100644 --- a/.github/workflows/publish-dist.yml +++ b/.github/workflows/publish-dist.yml @@ -33,7 +33,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Log in to the Container registry (ghcr) - if: ${{ github.event_name == 'pull_request' }} + if: ${{ ( github.event_name == 'pull_request' || github.event_name == 'pull_request_target' )t' || github.event_name == 'pull_request_target' ) }} uses: docker/login-action@v2 with: registry: ghcr.io @@ -145,7 +145,7 @@ jobs: ghcr.io/vegaprotocol/frontend/${{ matrix.app }}:local - name: Image digest - if: ${{ github.event_name == 'pull_request' }} + if: ${{ ( github.event_name == 'pull_request' || github.event_name == 'pull_request_target' ) }} run: echo ${{ steps.docker_build.outputs.digest }} - name: Sanity check docker image @@ -160,7 +160,7 @@ jobs: uses: docker/build-push-action@v3 continue-on-error: true id: ghcr-push - if: ${{ github.event_name == 'pull_request' }} + if: ${{ ( github.event_name == 'pull_request' || github.event_name == 'pull_request_target' ) }} with: context: . file: docker/node-outside-docker.Dockerfile @@ -230,7 +230,7 @@ jobs: - name: Add preview label uses: actions-ecosystem/action-add-labels@v1 - if: ${{ github.event_name == 'pull_request' }} + if: ${{ ( github.event_name == 'pull_request' || github.event_name == 'pull_request_target' ) }} with: labels: ${{ matrix.app }}-preview number: ${{ github.event.number }}