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

add additional image tags on push events #251

Merged
merged 1 commit into from
Nov 7, 2024
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
26 changes: 25 additions & 1 deletion .tekton/rapidast-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,36 @@ spec:
operator: in
values:
- "false"
- name: select-tags
description: select the tags used for apply-tags
image: registry.access.redhat.com/ubi9/ubi-minimal:9.4-1194@sha256:73f7dcacb460dad137a58f24668470a5a2e47378838a0190eef0ab532c6e8998
runAfter:
- build-image-index
results:
- name: TAGS
type: array
default: []
steps:
- name: Select tags based on branch
script: |
#!/bin/bash -ex

case "{{target_branch}}" in
"main") echo '["latest"]' > $(results.TAGS.path) ;;
"development") echo '["development"]' > $(results.TAGS.path) ;;
*) echo '[]' > $(results.TAGS.path) ;;
esac

echo "selected addtional tags:"
tee < $(results.TAGS.path)
- name: apply-tags
params:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: ADDITIONAL_TAGS
value: $(tasks.select-tags.results.TAGS)
runAfter:
- build-image-index
- select-tags
taskRef:
params:
- name: name
Expand Down
Loading