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.
pull/134/head
Robert Dailey 2 years ago
parent ada30da70b
commit c842c6d584

@ -50,14 +50,14 @@ jobs:
path: docker/artifacts path: docker/artifacts
- name: Login to Docker Hub - name: Login to Docker Hub
if: env.SHOULD_PUBLISH if: env.SHOULD_PUBLISH == 'true'
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR - name: Login to GHCR
if: env.SHOULD_PUBLISH if: env.SHOULD_PUBLISH == 'true'
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
@ -68,7 +68,7 @@ jobs:
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
context: ./docker context: ./docker
push: ${{ env.SHOULD_PUBLISH }} push: ${{ env.SHOULD_PUBLISH == 'true' }}
no-cache: true no-cache: true
platforms: linux/arm/v7,linux/arm64,linux/amd64 platforms: linux/arm/v7,linux/arm64,linux/amd64
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}

Loading…
Cancel
Save