diff --git a/README.md b/README.md index 47e119d..69e717d 100644 --- a/README.md +++ b/README.md @@ -34,5 +34,6 @@ steps: push_endpoint: https://example.com/endpoint expiration_time: 86400 # optional filter: 'attributes.sender_type = "PARENT"' # optional + subscription_suffix: something-useful # optional ``` diff --git a/action.yaml b/action.yaml index 7987083..643767a 100644 --- a/action.yaml +++ b/action.yaml @@ -31,6 +31,10 @@ inputs: description: "An optional filter to apply to the subscription (see https://cloud.google.com/pubsub/docs/subscription-message-filter). If not provided, the default filter is applied. To disable filtering, provide an empty string." required: false default: 'attributes.sender_type = "PARENT"' + subscription_suffix: + description: "An optional suffix to add to the end of the subscription name. This is useful when needing to create multiple subscriptions for the same topic (subscription names are unique)." + required: false + default: "" runs: using: 'docker' @@ -43,3 +47,4 @@ runs: - ${{ inputs.expiration_time }} - ${{ inputs.service_revision_tag }} - ${{ inputs.filter }} + - ${{ inputs.subscription_suffix }} diff --git a/create_push_subscription/entrypoint.sh b/create_push_subscription/entrypoint.sh index bb07fac..adb7276 100644 --- a/create_push_subscription/entrypoint.sh +++ b/create_push_subscription/entrypoint.sh @@ -1,3 +1,3 @@ #!/bin/sh -l -octue deploy create-push-subscription $1 $2 $3 $4 --expiration-time=$5 --revision-tag=$6 --filter=$7 +octue deploy create-push-subscription $1 $2 $3 $4 --expiration-time=$5 --revision-tag=$6 --filter=$7 --subscription-suffix=$8 diff --git a/poetry.lock b/poetry.lock index cb0c99b..e0d3683 100644 --- a/poetry.lock +++ b/poetry.lock @@ -899,7 +899,7 @@ hdf5 = ["h5py (>=3.6,<4.0)"] type = "git" url = "https://github.com/octue/octue-sdk-python" reference = "better-support-asynchronous-questions" -resolved_reference = "7c8069084d53e89b7cd93f2b04e4698993e236c1" +resolved_reference = "79732f70b4d37b3c6025629fcb3c16be31a958b4" [[package]] name = "packaging"