From 510f4c0271be570dab9bc8ca8774213bf43a0f3a Mon Sep 17 00:00:00 2001 From: felixZdi <93919627+felixZdi@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:08:48 +0200 Subject: [PATCH] Task/GitHub action trigger (#28) fix trigger condition for workflow call --- .github/workflows/docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'