Skip to content

Commit

Permalink
add optional extra-identity
Browse files Browse the repository at this point in the history
  • Loading branch information
ccwienk committed Nov 12, 2024
1 parent dbba24c commit 8660958
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/actions/ocm-oci-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ inputs:
description: |
An optional list of OCM Labels to add into OCM Resource fragment.
required: false
ocm_extra_identity:
description: |
Optional extra_identity to add into OCM Resource fragment.
required: false
target:
description: |
docker-build target (similar to `docker build --target`)
Expand Down Expand Up @@ -76,7 +80,7 @@ runs:
image_reference=${{ inputs.repository }}:${{ inputs.version }}
echo "image_reference=${image_reference}" >> "${GITHUB_OUTPUT}"
tags="${image_reference}"
if [ ${{ inputs.extra-tags | false }}; then
if [ ${{ inputs.extra-tags || false }}; then
for tag in $(echo -n ${{ inputs.extra-tags }}); do
tags="${tags},${{ inputs.repository }}:$tag"
done
Expand Down Expand Up @@ -111,6 +115,10 @@ runs:
if [ -n "${labels}" ]; then
echo -e "labels:\n${labels}" >> $r
fi
extra_identity="${{ inputs.ocm_extra_identity || false}}"
if [ "${extra_identity}" != 'false' ]; then
echo -e "extraIdentity:\n${extra_identity}" >> $r
fi
(
echo 'ocm_resource<<EOF'
Expand Down

0 comments on commit 8660958

Please sign in to comment.