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

Fix ko labels #71

Merged
merged 1 commit into from
Jul 28, 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
10 changes: 9 additions & 1 deletion .github/workflows/service.publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,20 @@ jobs:
uses: imjasonh/[email protected]
- name: Publish Docker Images
run: |
# Generate tags flag
# Generate tags flag (Metadata action output is newline delimited entries like
# 'ghcr.io/carbynestack/ephemeral:0.1.10' and we only need the part after the colon)
readarray -t tags < <( echo "${{ steps.meta.outputs.tags }}" )
for i in "${!tags[@]}"; do
readarray -d ":" -t parts < <( echo "${tags[i]}" )
tags[i]=$(echo "${parts[1]}" | tr -d '\n')
done
printf -v joined_tags "%s," "${tags[@]}"
# Generate label flags
readarray -t labels < <( echo "${{ steps.meta.outputs.labels }}" )
printf -v label_flags -- "--image-label=%s " "${labels[@]}"
# Publish using ko
ko publish -B \
--tags="${joined_tags%,}" \
"${label_flags}" \
Expand Down
Loading