Skip to content

Commit

Permalink
fix: preview comment step conditional statement (#28)
Browse files Browse the repository at this point in the history
* fix: preview comment step conditional statement

* use input instead of workflow events
  • Loading branch information
kpplis authored Nov 29, 2024
1 parent c5c43d1 commit 49b69af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-and-push-image-to-ecr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
description: Number of the current PR
required: true
type: number
GHA_TRIGGER_EVENT:
description: GitHub PR event that triggered the workflow
required: true
type: string
artifactName:
required: false
description: If provided, downloads a previously uploaded artifact (has to be in the same workflow). Both artifactPath and artifactName have to be passed.
Expand Down Expand Up @@ -68,7 +72,7 @@ jobs:
${{ steps.login-ecr.outputs.registry }}/${{ inputs.APPLICATION_NAME }}:preview
${{ steps.login-ecr.outputs.registry }}/${{ inputs.APPLICATION_NAME }}:${{ github.event.pull_request.head.sha }}
comment-pr:
if: contains(github.event.pull_request.labels.*.name, 'preview') && ${{ github.event.action != 'synchronize' }}
if: ${{ inputs.GHA_TRIGGER_EVENT != 'synchronize' }}
runs-on: ubuntu-latest
steps:
- name: Comment PR
Expand Down

0 comments on commit 49b69af

Please sign in to comment.