Skip to content

Commit

Permalink
deploy.sh: add ENGINE_CMD (enable podman)
Browse files Browse the repository at this point in the history
Enable the user to choose to build with a different container engine, such as podman.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
  • Loading branch information
moto-timo committed Dec 22, 2023
1 parent 1e7ce3a commit a67f972
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@

set -e

# Allow the user to specify another command to use for building such as podman
if [ "${ENGINE_CMD}" = "" ]; then
ENGINE_CMD="docker"
fi

# Don't deploy on pull requests because it could just be junk code that won't
# get merged
if ([ "${GITHUB_EVENT_NAME}" = "push" ] || [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ] || [ "${GITHUB_EVENT_NAME}" = "schedule" ]) && [ "${GITHUB_REF}" = "refs/heads/master" ]; then
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
docker push ${REPO}:latest
echo $DOCKER_PASSWORD | ${ENGINE_CMD} login -u $DOCKER_USERNAME --password-stdin
${ENGINE_CMD} push ${REPO}:latest
else
echo "Not pushing since build was triggered by a pull request."
fi

0 comments on commit a67f972

Please sign in to comment.