diff --git a/action.yaml b/action.yaml index b74c218..01e4ce2 100644 --- a/action.yaml +++ b/action.yaml @@ -92,10 +92,26 @@ runs: source "${{ github.action_path }}/../bashlib.sh" step "Install software" "podman" - if apt-get update && apt-get install -y podman ; then - success "Success" "Podman installation" + if command -v podman >/dev/null 2>&1; then + success "Already installed" "Podman found" + exit 0 + fi + + check_command apt-get + + . /etc/os-release + echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/${ID}_${VERSION_CODENAME}/ /" \ + | tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list + + curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/${ID}_${VERSION_CODENAME}/Release.key \ + | gpg --dearmor -o /etc/apt/trusted.gpg.d/libcontainers.gpg + + apt-get update + + if apt-get -y install podman; then + success "Success" "Podman installed" else - error "Podman installation" "Failed" + error "Install failed" "Could not install Podman" fi - name: Build image starting