From 37f3e1f154dd318ca3b5c948cfb4ab6c6316b3d5 Mon Sep 17 00:00:00 2001 From: Paul Selden Date: Thu, 26 Aug 2021 17:33:10 -0400 Subject: [PATCH] Add way to pass optional trigger to pubsub message --- action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 816f04e..74bf84d 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,10 @@ inputs: pubsub_topic: required: true description: Pubsub topic used to send trigger message to Spinnaker + trigger: + required: false + description: A string passed to the 'trigger' field of the pubsub topic + default: github action runs: using: composite steps: @@ -52,8 +56,8 @@ runs: --arg appVersion $CHART_APP_VERSION \ --arg gitCommit $GIT_SHORT_SHA \ --arg gitBranch ${{ github.ref }} \ - '{ appName: $appName, appVersion: $appVersion, gitCommit: $gitCommit, gitBranch: $gitBranch, trigger: "github action", }' + --arg trigger '${{ inputs.trigger }}" \ + '{ appName: $appName, appVersion: $appVersion, gitCommit: $gitCommit, gitBranch: $gitBranch, trigger: $trigger, }' ) echo "JSON: $json" gcloud pubsub topics publish ${{ inputs.pubsub_topic }} --message "$json" -