Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only publish PR images when label is set #2608

Merged
merged 4 commits into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 58 additions & 4 deletions .woodpecker/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")'
pat-s marked this conversation as resolved.
Show resolved Hide resolved

cross-compile-server:
image: *xgo_image
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down