Skip to content

Commit

Permalink
Merge pull request #771 from camptocamp/backport/764-to-release_3
Browse files Browse the repository at this point in the history
[Backport release_3] Publish Docker images to GitHub Container Registry
  • Loading branch information
sbrunner authored Nov 20, 2020
2 parents 0aa977e + 78f8016 commit 8b45004
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/publish
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@ then
summon --yaml '
USER: !var gs/ci/dockerhub/username
PASS: !var gs/ci/dockerhub/password
' bash -c 'docker login -u ${USER} -p ${PASS}'
' bash -c 'docker login --username=${USER} --password=${PASS}'
summon --yaml '
USER: !var gs/ci/github/username
PASS: !var gs/ci/github/token/gopass
' bash -c 'docker login ghcr.io --username=${USER} --password=${PASS}'
for tag_suffix in "-lite" "" "-full"
do
if [[ "${tag}" != "latest" ]]
then
docker tag camptocamp/c2cwsgiutils:latest${tag_suffix} camptocamp/c2cwsgiutils:${tag}${tag_suffix}
fi
docker tag camptocamp/c2cwsgiutils:latest${tag_suffix} ghcr.io/camptocamp/c2cwsgiutils:${tag}${tag_suffix}
docker push camptocamp/c2cwsgiutils:${tag}${tag_suffix}
docker push ghcr.io/camptocamp/c2cwsgiutils:${tag}${tag_suffix}
done
rm -rf ~/.docker* # docker logout
rm -rf ~/.docker* # Docker logout
fi

0 comments on commit 8b45004

Please sign in to comment.