feat: add logic for testing against pull_request_target

This commit is contained in:
Mikołaj Młodzikowski 2023-06-28 15:05:41 +02:00
parent 7bea90e4d1
commit 6765f4d03a
2 changed files with 6 additions and 6 deletions

View File

@ -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:

View File

@ -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 }}