Merge pull request 'ci: publish one tag per build, YYYY-MM-DD-HHMM' (#24) from claude/date-image-tag into main
Reviewed-on: #24
This commit was merged in pull request #24.
This commit is contained in:
@@ -19,14 +19,14 @@ steps:
|
||||
# The repo owner is an organisation; the registry login is the bot in its Bots team.
|
||||
- AUTH=$(printf "%s" "claude-bot:$GITEA_TOKEN" | base64 -w0)
|
||||
- printf '{"auths":{"%s":{"auth":"%s"}}}' "$$REGISTRY" "$AUTH" > /kaniko/.docker/config.json
|
||||
- BUILD_TAG="build.$(date +%s)"
|
||||
# One tag per build, YYYY-MM-DD-HHMM (UTC): the homelab Flux
|
||||
# ImagePolicy rolls out the newest, and Gitea's cleanup rule counts
|
||||
# every tag as a version, so extra tags would push this one out.
|
||||
- TAG="$(date +%Y-%m-%d-%H%M)"
|
||||
- >-
|
||||
/kaniko/executor
|
||||
--context=.
|
||||
--dockerfile=Dockerfile
|
||||
--destination=$$IMAGE:${CI_COMMIT_SHA}
|
||||
--destination=$$IMAGE:${CI_COMMIT_SHA:0:7}
|
||||
--destination=$$IMAGE:$${BUILD_TAG}
|
||||
--destination=$$IMAGE:main
|
||||
--destination=$$IMAGE:$${TAG}
|
||||
--snapshot-mode=redo
|
||||
--use-new-run
|
||||
|
||||
Reference in New Issue
Block a user