From 3d51b127603cc247c3c6a4845ec4919363f25450 Mon Sep 17 00:00:00 2001 From: Przemek Pokrywka <12400578+dekiel@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:29:13 +0200 Subject: [PATCH] Verify merge commit sha as the mergable is not required and was always empty. (#11874) --- .github/workflows/image-syncer.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/image-syncer.yml b/.github/workflows/image-syncer.yml index 5b2c534d8057..a3cac81a6b4b 100644 --- a/.github/workflows/image-syncer.yml +++ b/.github/workflows/image-syncer.yml @@ -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' }}