Skip to content

Commit

Permalink
Verify merge commit sha as the mergable is not required and was alway…
Browse files Browse the repository at this point in the history
…s empty. (#11874)
  • Loading branch information
dekiel authored Sep 11, 2024
1 parent d250b63 commit 3d51b12
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/image-syncer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
run: |
echo "Using image-syncer workflow outside of kyma-project organisation is not supported."
exit 1
# Verify if the pull request merge commit is available and pr is mergeable.
# Verify if the pull request merge commit sha is available.
# If this is not true, fail the workflow because we have no correct merge commit to work with.
- name: Verify merge commit
id: verify_merge_commit
- name: Verify merge commit sha
id: verify_merge_commit_sha
run: |
if [ "${{ github.event.pull_request.mergeable }}" != true ]; then
echo "::error title=PR commit merge error ::Pull request does not have a merge commit. Skipping the workflow."
if [ -z "${{ github.event.pull_request.merge_commit_sha }}" ]; then
echo "::error title=PR commit merge error ::Pull request does not have a merge commit sha. Skipping the workflow."
exit 1
fi
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
Expand Down

0 comments on commit 3d51b12

Please sign in to comment.