Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 63110eb

Browse files
Merge pull request #951 from lukaszstolarczuk/fix-docker-login-again
CI: require login to container registry only when pushing image
2 parents feb2af8 + f645fc3 commit 63110eb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/gha.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ jobs:
3333
with:
3434
fetch-depth: 50
3535

36-
- name: Log in to the container registry
37-
run: echo "${CONTAINER_REG_PASS}" | docker login ghcr.io -u="${CONTAINER_REG_USER}" --password-stdin
38-
3936
- name: Pull or rebuild the image
4037
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh
4138

utils/docker/images/push-image.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@ then
4343
exit 1
4444
fi
4545

46+
echo "Log in to the container registry"
47+
echo "${CONTAINER_REG_PASS}" | docker login ghcr.io -u="${CONTAINER_REG_USER}" --password-stdin
48+
4649
echo "Push the image to the container registry"
4750
docker push ${CONTAINER_REG}:${TAG}

0 commit comments

Comments
 (0)