Skip to content

Commit

Permalink
Revert "feat(CI): update Docker credentials and docker image names (#781
Browse files Browse the repository at this point in the history
)" (#788)

This reverts commit 937a368.
  • Loading branch information
andrewtpham authored Sep 22, 2022
1 parent bea5e4b commit 69a139a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/activity_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ jobs:
- name: Build and Push
env:
TAG_NAME: ${{ github.event.release.tag_name }}
# DOCKER_HUB_USERNM: ${{ secrets.DOCKER_HUB_USERNM }}
# DOCKER_HUB_PASSWD: ${{ secrets.DOCKER_HUB_PASSWD }}
DOCKER_HUB_USERNAME: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
DOCKER_HUB_PASSWORD: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
DOCKER_HUB_USERNM: ${{ secrets.DOCKER_HUB_USERNM }}
DOCKER_HUB_PASSWD: ${{ secrets.DOCKER_HUB_PASSWD }}
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
ACTIVITY_CE_DB_NAME_DEV: ${{ secrets.ACTIVITY_CE_DB_NAME_DEV }}
ACTIVITY_CE_DB_USER_DEV: ${{ secrets.ACTIVITY_CE_DB_USER_DEV }}
ACTIVITY_CE_DB_PASSWORD_DEV: ${{ secrets.ACTIVITY_CE_DB_PASSWORD_DEV }}
Expand Down Expand Up @@ -146,10 +146,10 @@ jobs:
APPLICATION_ENV: ${{ secrets.APPLICATION_ENV }}
CLUSTER_NAME_DEV_ENV: ${{ secrets.CLUSTER_NAME_DEV_ENV }}
SERVICE_ACCESS_TOKEN: ${{ secrets.SERVICE_ACCESS_TOKEN }}
# DOCKER_HUB_USERNM: ${{ secrets.DOCKER_HUB_USERNM }}
# DOCKER_HUB_PASSWD: ${{ secrets.DOCKER_HUB_PASSWD }}
DOCKER_HUB_USERNAME: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
DOCKER_HUB_PASSWORD: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
DOCKER_HUB_USERNM: ${{ secrets.DOCKER_HUB_USERNM }}
DOCKER_HUB_PASSWD: ${{ secrets.DOCKER_HUB_PASSWD }}
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
B64_TOKEN: ${{ secrets.B64_TOKEN }}
DEFAULT_NOTIFY: ${{ secrets.DEFAULT_NOTIFY }}
RATE_LIMIT: ${{ secrets.RATE_LIMIT }}
Expand Down
20 changes: 10 additions & 10 deletions ci-scripts/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ timestamp() {
}

#@--- Function to authenticate to docker hub ---@#
# docker_hub_auth() {
# if [[ $GITHUB_REF == "refs/heads/develop" ]] || [[ $GITHUB_EVENT_NAME == "release" ]]
# then
# docker login -p=$DOCKER_HUB_PASSWD -u=$DOCKER_HUB_USERNM
# fi
docker_hub_auth() {
if [[ $GITHUB_REF == "refs/heads/develop" ]] || [[ $GITHUB_EVENT_NAME == "release" ]]
then
docker login -p=$DOCKER_HUB_PASSWD -u=$DOCKER_HUB_USERNM
fi

# }
}

#@--- Function to export env variables ---@#
export_variables() {
Expand Down Expand Up @@ -65,10 +65,10 @@ build_and_push_image() {
docker push $REGISTRY_OWNER/activity:$APPLICATION_NAME-$APPLICATION_ENV-$GITHUB_SHA

docker logout
docker login registry.digitalocean.com -p=$DOCKER_HUB_PASSWORD -u=$DOCKER_HUB_USERNAME
docker login -p=$DOCKER_HUB_PASSWORD -u=$DOCKER_HUB_USERNAME
rm .env.deploy
docker build -t registry.digitalocean.com/hikaya/activity:$tag -f docker-deploy/Dockerfile .
docker push registry.digitalocean.com/hikaya/activity:$tag
docker build -t hikaya/activity:$tag -f docker-deploy/Dockerfile .
docker push hikaya/activity:$tag

fi

Expand Down Expand Up @@ -115,7 +115,7 @@ build_and_push_image() {


main() {
# docker_hub_auth
docker_hub_auth
build_and_push_image
}

Expand Down

0 comments on commit 69a139a

Please sign in to comment.