File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 main :
1515 runs-on : ubuntu-latest
1616 timeout-minutes : 30
17+ env :
18+ # Docker Hub credentials are not available for pull requests and Dependabot runs
19+ publish : ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }}
1720 steps :
1821 - name : Check out the repo
1922 uses : actions/checkout@v7
3336 - name : Set up Docker Buildx
3437 uses : docker/setup-buildx-action@v4
3538 - name : Login to Docker Hub
39+ if : env.publish == 'true'
3640 uses : docker/login-action@v4.6.0
3741 with :
3842 username : ${{ secrets.DOCKERHUB_USERNAME }}
4852 id : docker_build
4953 uses : docker/build-push-action@v7
5054 with :
51- platforms : ${{ env.platforms }}
52- push : ${{ github.event_name != 'pull_request' }}
55+ platforms : ${{ env.publish == 'true' && env.platforms || 'linux/amd64' }}
56+ push : ${{ env.publish == 'true' }}
57+ load : ${{ env.publish != 'true' }}
5358 tags : ${{ steps.docker_meta.outputs.tags }}
5459 labels : ${{ steps.docker_meta.outputs.labels }}
5560 cache-from : type=local,src=${{ github.workspace }}/cache
You can’t perform that action at this time.
0 commit comments