Skip to content

Commit

Permalink
update CI vars
Browse files Browse the repository at this point in the history
  • Loading branch information
haobibo committed Mar 13, 2024
1 parent f9f0758 commit 6adb0db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ on:
workflow_dispatch:

env:
REGISTRY_URL: "docker.io" # docker.io or other registry URL, DOCKER_REGISTRY_USER/DOCKER_REGISTRY_PASSWORD to be set in CI env.
REGISTRY_URL: "docker.io" # docker.io or other registry URL, DOCKER_REGISTRY_USERNAME/DOCKER_REGISTRY_PASSWORD to be set in CI env.
BUILDKIT_PROGRESS: "plain" # Full logs for CI build.

# DOCKER_REGISTRY_USER and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets.
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
# DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets.
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}

# used to sync image to mirror registry
Expand Down
2 changes: 1 addition & 1 deletion tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ push_image() {
KEYWORD="${1:-second}";
docker image prune --force && docker images | sort;
IMAGES=$(docker images | grep "${KEYWORD}" | awk '{print $1 ":" $2}') ;
echo "$DOCKER_REGISTRY_PASSWORD" | docker login "${REGISTRY_URL}" -u "$DOCKER_REGISTRY_USER" --password-stdin ;
echo "$DOCKER_REGISTRY_PASSWORD" | docker login "${REGISTRY_URL}" -u "$DOCKER_REGISTRY_USERNAME" --password-stdin ;
for IMG in $(echo "${IMAGES}" | tr " " "\n") ;
do
docker push "${IMG}";
Expand Down

0 comments on commit 6adb0db

Please sign in to comment.