Skip to content

Commit 7572299

Browse files
authored
Merge pull request #512 from bobrik/ivan/skip-docker-pr
Skip manifest push on PRs
2 parents 5c71e2b + 0718e30 commit 7572299

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,8 @@ jobs:
554554
id: build
555555
uses: docker/build-push-action@v6
556556
with:
557-
context: .
558557
platforms: ${{ matrix.arch.docker_platform }}
559-
outputs: type=image,"name=ghcr.io/${{ github.repository }}",push-by-digest=true,name-canonical=true,push=true
558+
outputs: type=image,"name=ghcr.io/${{ github.repository }}",push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
560559

561560
- name: Export digest
562561
run: |
@@ -614,10 +613,12 @@ jobs:
614613
615614
- name: Create manifest list and push
616615
working-directory: ${{ runner.temp }}/digests
616+
if: github.event_name != 'pull_request'
617617
run: |
618618
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") $(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *)
619619
620620
- name: Inspect image
621+
if: github.event_name != 'pull_request'
621622
run: |
622623
docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ steps.meta.outputs.version }}
623624

0 commit comments

Comments
 (0)