Skip to content

Commit

Permalink
fix event name checks
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Pickering <[email protected]>
  • Loading branch information
alexvpickering committed Aug 16, 2023
1 parent bad4287 commit 1a2c874
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
IMAGE_TAG=$REF_ID
TIMESTAMP=""
BATCH_IMAGE_TAG=production
elif [ "${{ github.event_name }}" = "pull_request" ]; then
elif [ "${{ github.event_name }}" = "pull_request_target" ]; then
COMMIT_SHA="${{ github.event.pull_request.head.sha }}"
IMAGE_TAG="$REF_ID-$COMMIT_SHA"
TIMESTAMP=$TIMESTAMP
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
- id: ref-previous
name: Format docker tag and repository name for the previous pushed image.
run: |-
if [ "${{ github.event_name }}" = "pull_request" ]; then
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
echo "This is a pull request, base ref and sha set to the target branch."
BASE_REF="refs-heads-${{ github.event.pull_request.base.ref }}"
BASE_SHA=${{ github.event.pull_request.base.sha }}
Expand Down Expand Up @@ -446,7 +446,7 @@ jobs:

- name: Change name of deployment file for staging deployment
if:
(github.event_name == 'pull_request' || github.event_name == 'push') && matrix.environment == 'staging'
(github.event_name == 'pull_request_target' || github.event_name == 'push') && matrix.environment == 'staging'
env:
DEPLOYMENT_NAME: ${{ steps.fill-metadata.outputs.deployment-name }}
REF_ID: ${{ needs.build-docker.outputs.ref-id }}
Expand All @@ -455,7 +455,7 @@ jobs:
- name: Push staging deployment template to releases
if:
(github.event_name == 'pull_request' || github.event_name == 'push') && matrix.environment == 'staging'
(github.event_name == 'pull_request_target' || github.event_name == 'push') && matrix.environment == 'staging'
uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
Expand Down

0 comments on commit 1a2c874

Please sign in to comment.