From 2d2e7091e407a675e81f8e83c69c77b40a941d3a Mon Sep 17 00:00:00 2001 From: Simon Templer Date: Mon, 20 Nov 2023 12:58:29 +0100 Subject: [PATCH] feat: make DockerHub login optional ...for Dockerfile workflow. --- .github/workflows/dockerfile.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/dockerfile.yml b/.github/workflows/dockerfile.yml index bb54ad9..ceb074e 100644 --- a/.github/workflows/dockerfile.yml +++ b/.github/workflows/dockerfile.yml @@ -35,10 +35,14 @@ jobs: images: ${{ inputs.image }} - name: Login to DockerHub + if: env.DOCKER_HUB_USERNAME uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} + env: + DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} + - name: Build and push uses: docker/build-push-action@v5 with: