Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
main:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
# Docker Hub credentials are not available for pull requests and Dependabot runs
publish: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }}
steps:
- name: Check out the repo
uses: actions/checkout@v7
Expand All @@ -33,6 +36,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Docker Hub
if: env.publish == 'true'
uses: docker/login-action@v4.6.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -48,8 +52,9 @@ jobs:
id: docker_build
uses: docker/build-push-action@v7
with:
platforms: ${{ env.platforms }}
push: ${{ github.event_name != 'pull_request' }}
platforms: ${{ env.publish == 'true' && env.platforms || 'linux/amd64' }}
push: ${{ env.publish == 'true' }}
load: ${{ env.publish != 'true' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=local,src=${{ github.workspace }}/cache
Expand Down