wash icon indicating copy to clipboard operation
wash copied to clipboard

[FEATURE] Add annotations as optional parameters to oci push

Open ricochet opened this issue 4 months ago • 3 comments

Add annotations as optional parameters to oci push.

 wkg oci push -h
...
  -a, --author <AUTHOR>          An optional author to set for the pushed component
      --annotation <ANNOTATION>  Add an OCI annotation to the image manifest

Additionally, we could simplify this for end-users by also supporting parameters that align with opencontainers annotations, e.g. --description translates to --annotation "org.opencontainers.image.description"="${{ inputs.description }}".

output=$(wash oci push ${{ inputs.oci-reference-without-tag }}:${{ inputs.version }} ${{ inputs.file }}\
  --annotation "org.opencontainers.image.description"="${{ inputs.description }}" \
  --annotation "org.opencontainers.image.source"="${{ inputs.source }}" \
  --annotation "org.opencontainers.image.url"="${{ inputs.homepage }}" \
  --annotation "org.opencontainers.image.version"="${{ inputs.version }}" \
  --annotation "org.opencontainers.image.licenses"="${{ inputs.licenses }}")

digest=$(echo "$output" | grep -oP 'digest: \K.*')

ricochet avatar Aug 20 '25 14:08 ricochet