Skip to content

Commit

Permalink
Add outputs to container build workflow (#115)
Browse files Browse the repository at this point in the history
* image path added in output in pr container build

* was not getting image path in output - fixed
  • Loading branch information
zoha-jamil authored Jul 15, 2024
1 parent e24c9ef commit 73c3a28
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/pull_request_container_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 73c3a28

Please sign in to comment.