Add additional tag to next image with commit sha (#1365)

Next image will have an additional tag of format `next-${truncated_commit_sha}`,

where truncated_commit_sha is the first 10 characters of the commit sha
(also, same for for the `next-alpine` image).
This commit is contained in:
Divya Jain 2022-10-29 22:58:47 +05:30 committed by GitHub
parent f65654c226
commit a5e1714039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,7 @@ pipeline:
repo: woodpeckerci/woodpecker-server repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.multiarch dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_server platforms: *platforms_server
tag: next tag: [next, "next-${CI_COMMIT_SHA:0:10}"]
when: when:
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
event: push event: push
@ -87,7 +87,7 @@ pipeline:
repo: woodpeckerci/woodpecker-server repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.alpine.multiarch dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_alpine platforms: *platforms_alpine
tag: next-alpine tag: [next-alpine, "next-${CI_COMMIT_SHA:0:10}-alpine"]
when: when:
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
event: push event: push
@ -168,7 +168,7 @@ pipeline:
repo: woodpeckerci/woodpecker-agent repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.multiarch dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_release platforms: *platforms_release
tag: next tag: [next, "next-${CI_COMMIT_SHA:0:10}"]
when: when:
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
event: push event: push
@ -181,7 +181,7 @@ pipeline:
repo: woodpeckerci/woodpecker-agent repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch dockerfile: docker/Dockerfile.agent.alpine.multiarch
platforms: *platforms_alpine platforms: *platforms_alpine
tag: next-alpine tag: [next-alpine, "next-${CI_COMMIT_SHA:0:10}-alpine"]
when: when:
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
event: push event: push
@ -262,7 +262,7 @@ pipeline:
repo: woodpeckerci/woodpecker-cli repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_release platforms: *platforms_release
tag: next tag: [next, "next-${CI_COMMIT_SHA:0:10}"]
when: when:
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
event: push event: push
@ -275,7 +275,7 @@ pipeline:
repo: woodpeckerci/woodpecker-cli repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch dockerfile: docker/Dockerfile.cli.alpine.multiarch
platforms: *platforms_alpine platforms: *platforms_alpine
tag: next-alpine tag: [next-alpine, "next-${CI_COMMIT_SHA:0:10}-alpine"]
when: when:
branch: ${CI_REPO_DEFAULT_BRANCH} branch: ${CI_REPO_DEFAULT_BRANCH}
event: push event: push