Skip to content
Permalink
Browse files

feat(cd): docker images now push to github during merge and tag

  • Loading branch information...
hanxiao committed Sep 25, 2019
1 parent b6f2cda commit 8bef90dda91a96670c69bcac16728335edfbe6dc
Showing with 20 additions and 0 deletions.
  1. +8 −0 .drone-cd.yml
  2. +12 −0 docker-build.sh
@@ -35,6 +35,10 @@ steps:
from_secret: BADGE_WEBHOOK
BOT_URL:
from_secret: BOT_URL
GITHUB_USER:
from_secret: GITHUB_USER
GITHUB_PWD:
from_secret: GITHUB_PWD
commands:
- ./docker-build.sh
- docker system prune -a -f
@@ -114,6 +118,10 @@ steps:
from_secret: BADGE_WEBHOOK
BOT_URL:
from_secret: BOT_URL
GITHUB_USER:
from_secret: GITHUB_USER
GITHUB_PWD:
from_secret: GITHUB_PWD
commands:
- ./docker-build.sh

@@ -53,6 +53,12 @@ do
login_push ${HUB_USER} ${HUB_PWD} " " gnes
fi

if [[ -z "${GITHUB_USER}" ]]; then
printf "\$GITHUB_USER not set, pass\n"
else
login_push ${GITHUB_USER} ${GITHUB_PWD} docker.pkg.github.com docker.pkg.github.com/gnes-ai/gnes
fi

if [[ -z "${TCLOUD_USER}" ]]; then
printf "\$TCLOUD_USER not set, pass\n"
else
@@ -76,6 +82,12 @@ else
docker tag ${ALPINE_TAG} ccr.ccs.tencentyun.com/gnes/${DEFAULT_TAG} && docker push ccr.ccs.tencentyun.com/gnes/${DEFAULT_TAG}
fi

if [[ -z "${GITHUB_USER}" ]]; then
printf "\$GITHUB_USER not set, pass\n"
else
docker tag ${ALPINE_TAG} docker.pkg.github.com/gnes-ai/gnes/${DEFAULT_TAG} && docker push docker.pkg.github.com/gnes-ai/gnes/${DEFAULT_TAG}
fi

if [[ -z "${BADGE_WEBHOOK}" ]]; then
printf "\$BADGE_WEBHOOK not set, pass\n"
else

0 comments on commit 8bef90d

Please sign in to comment.
You can’t perform that action at this time.