diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0aa8a11..7c6ad49 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -72,7 +72,7 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - name: Login to GitHub Container Registry - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' || inputs.tag != '' uses: docker/login-action@v3 with: registry: ghcr.io @@ -85,7 +85,7 @@ jobs: context: . file: ./Dockerfile platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || inputs.tag != '' }} tags: ${{ steps.env.outputs.tags }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache @@ -97,7 +97,7 @@ jobs: org.opencontainers.image.licenses=${{ github.event.repository.license.name }} - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name != 'pull_request' || inputs.tag != '' }} with: image-ref: ${{ steps.env.outputs.tags }} format: 'table'