Skip to content

Commit

Permalink
feat: override image labels
Browse files Browse the repository at this point in the history
  • Loading branch information
genert authored Dec 4, 2024
1 parent 8903513 commit b089fdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oci/private/image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ for ARG in "$@"; do
CONFIG=$(jq --arg workdir "${ARG#--workdir=}" '.config.WorkingDir = $workdir' <<<"$CONFIG")
;;
--labels=*)
CONFIG=$(jq --rawfile labels "${ARG#--labels=}" '.config.Labels += ($labels | split("\n") | map(select(. | length > 0)) | map(. | split("=")) | map({key: .[0], value: .[1:] | join("=")}) | from_entries)' <<<"$CONFIG")
CONFIG=$(jq --rawfile labels "${ARG#--labels=}" '.config.Labels = ($labels | split("\n") | map(select(. | length > 0)) | map(. | split("=")) | map({key: .[0], value: .[1:] | join("=")}) | from_entries)' <<<"$CONFIG")
;;
--created=*)
CONFIG=$(jq --rawfile created "${ARG#--created=}" '.created = $created' <<<"$CONFIG")
Expand Down

0 comments on commit b089fdb

Please sign in to comment.