CI: Linux: Dont fail if dockerhub_username is not set

Signed-off-by: Luis Garcia <git@luigi311.com>
This commit is contained in:
Luis Garcia 2025-03-07 17:53:12 -07:00
parent 8ec6b11c8e
commit 68e1c5649e

View file

@ -95,7 +95,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ikatson/rqbit
${{ vars.DOCKERHUB_USERNAME }}/rqbit, enable=${{ vars.DOCKERHUB_USERNAME != '' }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
@ -120,6 +120,8 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: "${{ vars.DOCKERHUB_USERNAME != '' }}"
id: docker_login
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
@ -128,7 +130,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
push: ${{ steps.docker_login.outcome == 'success' }}
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
context: target/cross/