From 73c3a2884502fd04eb62fcf3b228ca55ad66e729 Mon Sep 17 00:00:00 2001 From: zoha-jamil <92304570+zoha-jamil@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:53:17 +0400 Subject: [PATCH] Add outputs to container build workflow (#115) * image path added in output in pr container build * was not getting image path in output - fixed --- .github/workflows/pull_request_container_build.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pull_request_container_build.yaml b/.github/workflows/pull_request_container_build.yaml index 9ec0591..4628409 100644 --- a/.github/workflows/pull_request_container_build.yaml +++ b/.github/workflows/pull_request_container_build.yaml @@ -33,10 +33,16 @@ on: DOCKER_SECRETS: description: Docker build secrets required: false + outputs: + IMAGE_PATH: + description: "The path of the image created" + value: ${{ jobs.build.outputs.image_output }} jobs: build: runs-on: ubuntu-latest + outputs: + image_output: ${{ steps.set_output.outputs.IMAGE_PATH }} if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" steps: - name: Check out code @@ -54,6 +60,10 @@ jobs: tag="SNAPSHOT-PR-${{ github.event.pull_request.number }}-${sha:0:8}" echo "GIT_TAG=$(echo ${tag})" >> $GITHUB_OUTPUT + - name: Set Output + id: set_output + run: echo "IMAGE_PATH=${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }}" >> $GITHUB_OUTPUT + - name: Set up QEMU uses: docker/setup-qemu-action@v3