podman-run-action/entrypoint.sh

12 lines
344 B
Bash
Raw Permalink Normal View History

2020-06-18 01:47:31 +03:00
#!/usr/bin/env bash
if [ ! -z $INPUT_USERNAME ];
then echo $INPUT_PASSWORD | podman login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin
2020-06-18 01:47:31 +03:00
fi
if [ ! -z $INPUT_PODMAN_NETWORK ];
then INPUT_OPTIONS="$INPUT_OPTIONS --network $INPUT_PODMAN_NETWORK"
2021-02-16 00:21:09 +03:00
fi
exec podman run $INPUT_OPTIONS --entrypoint="$INPUT_SHELL" $INPUT_IMAGE -c "${INPUT_RUN}"