Only publish PR images when label is set (#2608)

This commit is contained in:
Patrick Schratz 2023-10-20 11:27:30 +02:00 committed by GitHub
parent ec3a3cc9e1
commit bb7e0f9221
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,7 @@ steps:
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
when:
event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
publish-server-alpine-preview:
image: woodpeckerci/plugin-docker-buildx:2.1.0
@ -92,7 +92,33 @@ steps:
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
when:
event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
publish-server-preview-dry:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
group: docker
settings:
dry_run: true
repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
publish-server-alpine-preview-dry:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
group: docker
settings:
dry_run: true
repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
cross-compile-server:
image: *xgo_image
@ -204,7 +230,21 @@ steps:
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
when:
event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
publish-agent-preview-dry:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
settings:
dry_run: true
repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
publish-next-agent:
group: docker
@ -305,7 +345,21 @@ steps:
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
when:
event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
publish-cli-preview-dry:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
settings:
dry_run: true
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
publish-next-cli:
group: docker