From 55eaee56cfddea18cc276de50346c495c43ee2ea Mon Sep 17 00:00:00 2001 From: Xin Ruan Date: Thu, 19 Sep 2024 15:54:03 +0200 Subject: [PATCH] fix tag --- .github/workflows/build-image.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 7f895e21cb..ca58f56d05 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -21,20 +21,25 @@ jobs: compute-tag: runs-on: ubuntu-latest outputs: - tag: ${{ steps.get_tag.outputs.tag }} + tags: ${{ steps.get_tag.outputs.tags }} steps: - name: Get the latest tag id: get_tag run: | if [[ "${{ inputs.tag }}" != "" ]]; then - echo "tag=${{ inputs.tag }}" >> $GITHUB_OUTPUT + echo "tags=${{ inputs.tag }}" >> $GITHUB_OUTPUT elif [[ "${{ github.event_name }}" == "push" ]]; then - echo "tag=latest" >> $GITHUB_OUTPUT + echo "tags=latest" >> $GITHUB_OUTPUT else - echo "tag=PR-${{ github.event.pull_request.number }}\n${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT + { + echo 'tags<> "$GITHUB_OUTPUT" fi - name: Display output - run: echo ${{ steps.get_tag.outputs.tag }} + run: echo ${{ steps.get_tag.outputs.tags }} build-image: needs: compute-tag uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main @@ -42,7 +47,7 @@ jobs: name: lifecycle-manager dockerfile: Dockerfile context: . - tags: ${{ needs.compute-tag.outputs.tag }} + tags: ${{ needs.compute-tag.outputs.tags }} test-image: runs-on: ubuntu-latest needs: build-image