From 39ab2eb10f3da4c731ac09ecdfb19b434fb4ba20 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Sat, 25 Mar 2023 01:02:28 -0500 Subject: [PATCH] Skip Docker push for Dependabot PRs --- .github/workflows/build-docker.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 629dc245..072c86fa 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -69,11 +69,13 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub uses: docker/login-action@v2 + if: github.secret_source == 'Actions' with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Container Registry uses: docker/login-action@v2 + if: github.secret_source == 'Actions' with: registry: ghcr.io username: ${{ github.actor }} @@ -100,7 +102,7 @@ jobs: context: . file: ${{ matrix.dockerfile }} pull: true - push: true + push: ${{ github.secret_source == 'Actions' }} platforms: ${{ matrix.platforms }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}