diff --git a/action.yml b/action.yml index 4b8b4dc..adbe1cf 100644 --- a/action.yml +++ b/action.yml @@ -28,6 +28,9 @@ inputs: skip_existing: description: "Skip package upload if release exists" required: false + skip_upload: + description: "Skip package upload" + required: false mark_as_latest: description: Mark the created GitHub release as 'latest' required: false @@ -72,6 +75,10 @@ runs: args+=(--skip-existing "${{ inputs.skip_existing }}") fi + if [[ -n "${{ inputs.skip_upload }}" ]]; then + args+=(--skip-upload "${{ inputs.skip_upload }}") + fi + if [[ -n "${{ inputs.mark_as_latest }}" ]]; then args+=(--mark-as-latest "${{ inputs.mark_as_latest }}") fi diff --git a/cr.sh b/cr.sh index 14ef919..692f88c 100755 --- a/cr.sh +++ b/cr.sh @@ -34,6 +34,7 @@ Usage: $(basename "$0") -i, --install-only Just install the cr tool -s, --skip-packaging Skip the packaging step (run your own packaging before using the releaser) --skip-existing Skip package upload if release exists + --skip-upload Skip package upload, just create the release. Note needed in case of OCI upload. -l, --mark-as-latest Mark the created GitHub release as 'latest' (default: true) EOF } @@ -48,6 +49,7 @@ main() { local install_only= local skip_packaging= local skip_existing= + local skip_upload= local mark_as_latest=true parse_command_line "$@" @@ -85,7 +87,10 @@ main() { done release_charts - update_index + + if [[ -z "$skip_upload" ]]; then + update_index + fi else echo "Nothing to do. No chart changes detected." fi @@ -94,7 +99,10 @@ main() { rm -rf .cr-index mkdir -p .cr-index release_charts - update_index + + if [[ -z "$skip_upload" ]]; then + update_index + fi fi popd > /dev/null @@ -181,6 +189,12 @@ parse_command_line() { shift fi ;; + --skip-upload) + if [[ -n "${2:-}" ]]; then + skip_upload="$2" + shift + fi + ;; -l|--mark-as-latest) if [[ -n "${2:-}" ]]; then mark_as_latest="$2"