Skip to content

Commit

Permalink
Enable deployment to ghcr.io
Browse files Browse the repository at this point in the history
Enable deployment to ghcr.io, not just docker hum

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
  • Loading branch information
moto-timo committed Dec 22, 2023
1 parent a67f972 commit 120426e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ fi
# 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 | ${ENGINE_CMD} login -u $DOCKER_USERNAME --password-stdin
${ENGINE_CMD} push ${REPO}:latest
${ENGINE_CMD} push ${REPO}:latest

${ENGINE_CMD} tag $REPO:latest ghcr.io/$REPO:latest

echo $GHCR_PASSWORD | ${ENGINE_CMD} login ghcr.io -u $GHCR_USERNAME --password-stdin
${ENGINE_CMD} push ghcr.io/${REPO}:latest
else
echo "Not pushing since build was triggered by a pull request."
fi

0 comments on commit 120426e

Please sign in to comment.