From 6a30314afd67afca8cc264eecbb084a06493b66b Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Fri, 21 Jul 2023 10:52:30 +0200 Subject: [PATCH] [CI] don't try to login without credentials --- .github/workflows/containers.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 05a4367..8b41328 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -576,6 +576,7 @@ jobs: run: sudo apt-get install -y skopeo - name: Login to GitHub Container Registry id: ghcr-login + if: ${{ env.ghcr-credentials == 'true' }} uses: docker/login-action@v2 with: registry: ghcr.io @@ -583,12 +584,14 @@ jobs: password: ${{ secrets.GHCR_TOKEN }} - name: Login to Docker Hub id: docker-hub-login + if: ${{ env.docker-hub-credentials == 'true' }} uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Login to Gitea id: docker-hub-login + if: ${{ env.gitea-credentials == 'true' }} uses: docker/login-action@v2 with: registry: git.sporq.de @@ -661,6 +664,7 @@ jobs: run: sudo apt-get install -y skopeo - name: Login to GitHub Container Registry id: ghcr-login + if: ${{ env.ghcr-credentials == 'true' }} uses: docker/login-action@v2 with: registry: ghcr.io @@ -668,12 +672,14 @@ jobs: password: ${{ secrets.GHCR_TOKEN }} - name: Login to Docker Hub id: docker-hub-login + if: ${{ env.docker-hub-credentials == 'true' }} uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Login to Gitea id: docker-hub-login + if: ${{ env.gitea-credentials == 'true' }} uses: docker/login-action@v2 with: registry: git.sporq.de