Skip to content

Commit

Permalink
add arg for push by digest
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphall committed Oct 2, 2024
1 parent be9bd13 commit 89e532a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/actions/build-container-local/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ inputs:
required: false
default: 'linux/amd64'

by_digest:
description: 'Whether to build and push the image by digest instead of tag'
required: false
default: false

outputs:
image-list:
description: >-
Expand Down Expand Up @@ -163,7 +168,7 @@ runs:

- name: Build and push Docker images
id: build-and-push
if: success() && fromJSON(inputs.push_image)
if: success() && fromJSON(inputs.push_by_digest)
uses: docker/build-push-action@v6
with:
context: ${{ inputs.context }}
Expand All @@ -178,7 +183,7 @@ runs:

- name: Build Docker images
id: build
if: success() && !fromJSON(inputs.push_image)
if: success() && !fromJSON(inputs.push_by_digest)
uses: docker/build-push-action@v6
with:
load: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
osg_repo: ${{ matrix.repo }}
base_os: ${{ matrix.os }}
platform: ${{ matrix.platform }}
push_image: true
push_by_digest: true
output_image: ${{ steps.custom-image-name.outputs.output_image }}

- name: Export digest
Expand Down

0 comments on commit 89e532a

Please sign in to comment.