Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

fix: method for not specifying target #3

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ jobs:
run: exit 1
- name: Exit
shell: bash
run: exit 0
run: exit 0
17 changes: 14 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ inputs:
target:
description: target to build in Containerfile
required: false
default: main
default: none
container_registry:
description: registry to store resulting container
required: false
Expand Down Expand Up @@ -142,6 +142,17 @@ runs:
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/main/README.md
io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4

- name: Determine extra args
id: extra-args
shell: bash
run: |
if [[ ${{ inputs.target }} == "none" ]]
then
echo "args=" >> $GITHUB_OUTPUT
else
echo "args=--target=${{ inputs.target }}" >> $GITHUB_OUTPUT
fi

# Build image using Buildah action
- name: Build Image
id: build_image
Expand All @@ -161,8 +172,8 @@ runs:
labels: ${{ steps.meta.outputs.labels }}
oci: false
#TODO: Split Containerfiles
extra-args: |
--target=${{ inputs.target }}
extra-args: ${{ steps.extra-args.outputs.args }}


- name: Get list of images to verify
id: images_to_verify
Expand Down
Loading