diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml index d543e57..763e256 100644 --- a/.github/workflows/hadolint.yml +++ b/.github/workflows/hadolint.yml @@ -32,21 +32,23 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: github.event_name == 'push' + if: github.event_name != 'pull_request'' uses: docker/login-action@v3 with: username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - name: Build and push - if: github.event_name == 'push' uses: docker/bake-action@v4 with: workdir: hadolint - push: true + push: ${{ github.event_name != 'pull_request' }} + files: | + ./docker-bake.hcl + ${{ steps.meta.outputs.bake-file }} - name: Update Docker Hub Description - if: github.event_name == 'push' + if: github.event_name != 'push' uses: peter-evans/dockerhub-description@v3 with: username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}