CI: Linux: Dont fail if dockerhub_username is not set
Signed-off-by: Luis Garcia <git@luigi311.com>
This commit is contained in:
parent
8ec6b11c8e
commit
68e1c5649e
1 changed files with 4 additions and 2 deletions
6
.github/workflows/release-linux.yml
vendored
6
.github/workflows/release-linux.yml
vendored
|
|
@ -95,7 +95,7 @@ jobs:
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
ikatson/rqbit
|
${{ vars.DOCKERHUB_USERNAME }}/rqbit, enable=${{ vars.DOCKERHUB_USERNAME != '' }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
|
|
@ -120,6 +120,8 @@ jobs:
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
|
if: "${{ vars.DOCKERHUB_USERNAME != '' }}"
|
||||||
|
id: docker_login
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
|
|
@ -128,7 +130,7 @@ jobs:
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: true
|
push: ${{ steps.docker_login.outcome == 'success' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
context: target/cross/
|
context: target/cross/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue