diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index b6bc39d64..ab61530cb 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -40,7 +40,6 @@ jobs: if [[ $GITHUB_EVENT_NAME == 'push' ]]; then echo 'TAGS=${{ github.ref_name }}' >> "$GITHUB_OUTPUT" elif [[ $GITHUB_EVENT_NAME == 'merge_group' ]]; then - { echo 'TAGS=${{ github.event.merge_group.head_sha }}' >> "$GITHUB_OUTPUT" else { diff --git a/.github/workflows/pr-integration.yml b/.github/workflows/pr-integration.yml index 4cefd1269..db1ac0bf0 100644 --- a/.github/workflows/pr-integration.yml +++ b/.github/workflows/pr-integration.yml @@ -1,7 +1,8 @@ name: PR Integration env: - IMG: europe-docker.pkg.dev/kyma-project/dev/telemetry-manager:PR-${{ github.event.number }} + # add the tag PR- to the image if it is a PR, if the trigger is merge_group, then add the sha as the tag + IMG: europe-docker.pkg.dev/kyma-project/dev/telemetry-manager:${{ github.event_name == 'pull_request' && 'PR-' || '' }}${{ github.event.number || github.event.merge_group.head_sha }} on: merge_group: diff --git a/.github/workflows/pr-lifecycle.yml b/.github/workflows/pr-lifecycle.yml index 0ca913dd8..213f2d9e1 100644 --- a/.github/workflows/pr-lifecycle.yml +++ b/.github/workflows/pr-lifecycle.yml @@ -70,7 +70,9 @@ jobs: - name: Deploy with current version shell: bash run: | - IMG=europe-docker.pkg.dev/kyma-project/dev/telemetry-manager:PR-${{ github.event.number }} make deploy-dev + # add the tag PR- to the image if it is a PR, if the trigger is merge_group, then add the sha as the tag + TAG="${{ github.event_name == 'pull_request' && 'PR-' || '' }}${{ github.event.number || github.event.merge_group.head_sha }}" + IMG=europe-docker.pkg.dev/kyma-project/dev/telemetry-manager:${TAG} make deploy-dev - name: Wait for manager readiness shell: bash diff --git a/hack/await_image.sh b/hack/await_image.sh index 780e076f0..32400b13d 100755 --- a/hack/await_image.sh +++ b/hack/await_image.sh @@ -20,7 +20,7 @@ START_TIME=$SECONDS until $(skopeo list-tags ${PROTOCOL}${IMAGE_REPO} | jq '.Tags|any(. == env.TRIGGER)'); do if (( SECONDS - START_TIME > TIMEOUT )); then - echo "Timeout reached: ${IMAGE_REPO}:${COMMIT_SHA} not found within $(( TIMEOUT/60 )) minutes" + echo "Timeout reached: ${IMAGE_REPO}:${TRIGGER} not found within $(( TIMEOUT/60 )) minutes" exit 1 fi echo "Waiting for binary image: ${IMAGE_REPO}:${TRIGGER}"