Skip to content

Commit

Permalink
Merge branch 'docker_hub.yml-if' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed May 11, 2024
2 parents a73f38c + d2465d1 commit 5406443
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/docker_hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ jobs:
if: env.JOB_DONE == 'false'

- name: Login to Docker Hub
id: login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: env.JOB_DONE == 'false'
if: env.JOB_DONE == 'false' && secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_TOKEN

- name: Build and push make-build
uses: docker/build-push-action@v5
Expand All @@ -85,8 +86,9 @@ jobs:
target: ${{ inputs.dockerfile_target }}
build-args: |
MAKE_BUILD=${{ env.BASE }}
push: true
push: ${{ steps.login.outcome == 'success' }}
tags: ${{ env.TAG_LIST }}
cache-from: type=gha
cache-to: type=gha,mode=max
if: env.JOB_DONE == 'false'
# run even if there are no push credentials (just don't push)
if: (success() || failure()) && env.JOB_DONE == 'false'

0 comments on commit 5406443

Please sign in to comment.