From c842c6d584a19edcb612034e2b26f42d50184bb1 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Wed, 19 Oct 2022 09:16:11 -0500 Subject: [PATCH] ci: Proper boolean comparison for SHOULD_PUBLISH Because `SHOULD_PUBLISH` is an environment variable, it isn't a true boolean: it's a string. Update the `if:` condition logic to handle it as a string instead. --- .github/workflows/docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ff277798..1301bbb1 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -50,14 +50,14 @@ jobs: path: docker/artifacts - name: Login to Docker Hub - if: env.SHOULD_PUBLISH + if: env.SHOULD_PUBLISH == 'true' uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GHCR - if: env.SHOULD_PUBLISH + if: env.SHOULD_PUBLISH == 'true' uses: docker/login-action@v2 with: registry: ghcr.io @@ -68,7 +68,7 @@ jobs: uses: docker/build-push-action@v3 with: context: ./docker - push: ${{ env.SHOULD_PUBLISH }} + push: ${{ env.SHOULD_PUBLISH == 'true' }} no-cache: true platforms: linux/arm/v7,linux/arm64,linux/amd64 tags: ${{ steps.meta.outputs.tags }}