ci(docker-publish): 👷 Update workflow to trigger certain steps only on push events
- Modify conditions to ensure `docker/login-action` runs only on push - Add condition to gate `docker/publish-action` execution on push event
This commit is contained in:
@@ -27,7 +27,7 @@ jobs:
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- name: Login to GitHub Container Registry
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name == 'push'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -59,3 +59,4 @@ jobs:
|
||||
subject-name: ghcr.io/${{ github.repository }}
|
||||
subject-digest: ${{ steps.build.outputs.digest }}
|
||||
push-to-registry: true
|
||||
if: github.event_name == 'push'
|
||||
|
||||
Reference in New Issue
Block a user