Skip to content

Commit

Permalink
Merge pull request #1 from openx/add-trigger
Browse files Browse the repository at this point in the history
Add way to pass optional trigger to pubsub message
  • Loading branch information
bjakubski authored Aug 27, 2021
2 parents fa0d018 + 37f3e1f commit c045b3b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"

0 comments on commit c045b3b

Please sign in to comment.