Skip to content
Merged
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
36 changes: 33 additions & 3 deletions github-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,43 @@ inputs:
description: "tag for container image, i.e.: v5"
default: "v5"
required: true
CONTAINER_ENGINE:
description: "Optional: explicitly set container engine (docker/podman)"
required: false

runs:
using: "composite"
steps:
- name: Determine container engine
id: detect_engine
shell: bash
run: |
set -e
# Respect explicit override
if [[ -n "${{ inputs.CONTAINER_ENGINE }}" ]]; then
echo "engine=${{ inputs.CONTAINER_ENGINE }}" >> "$GITHUB_OUTPUT"
else
if command -v podman >/dev/null 2>&1; then
echo "engine=podman" >> "$GITHUB_OUTPUT"
elif command -v docker >/dev/null 2>&1; then
echo "engine=docker" >> "$GITHUB_OUTPUT"
else
echo "Neither podman nor docker found in PATH" >&2
exit 1
fi
fi

- name: Download pluto binary
shell: bash
run: |
podman pull ${{ inputs.IMAGE_PULL_URL }}:${{ inputs.IMAGE_TAG }}
podman cp $(podman create --rm ${{ inputs.IMAGE_PULL_URL }}:${{ inputs.IMAGE_TAG }}):/pluto /usr/local/bin/pluto
set -e
ENGINE="${{ steps.detect_engine.outputs.engine }}"
IMAGE="${{ inputs.IMAGE_PULL_URL }}:${{ inputs.IMAGE_TAG }}"
DEST="/usr/local/bin/pluto"

echo "Using container engine: $ENGINE to pull image: $IMAGE"
"$ENGINE" pull "$IMAGE"
"$ENGINE" cp $($ENGINE create --rm ${{ inputs.IMAGE_PULL_URL }}:${{ inputs.IMAGE_TAG }}):/pluto /usr/local/bin/pluto

pluto --help
chmod +x "$DEST"
"$DEST" --help