From bfd2706bbcafd8268118f3ab023811cb7267d6ca Mon Sep 17 00:00:00 2001 From: Dylan Ratcliffe Date: Wed, 27 Nov 2024 17:04:06 +0000 Subject: [PATCH] Add the ability to define tags Fixes #31 --- submit-plan/action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/submit-plan/action.yml b/submit-plan/action.yml index e4050a2..30ba90d 100644 --- a/submit-plan/action.yml +++ b/submit-plan/action.yml @@ -32,6 +32,9 @@ inputs: app: description: "The Overmind instance to connect to. Defaults to `https://app.overmind.tech`" required: false + tags: + description: "A comma separated list of key=value tags to attach to the change" + required: false outputs: change-url: @@ -88,6 +91,10 @@ runs: tf_plan_output_arg="--terraform-plan-output ${{ inputs.plan-output }}" fi + if [ -n "${{ inputs.tags }}" ]; then + tags_arg="--tags ${{ inputs.tags }}" + fi + if [ ${{ github.event_name }} = pull_request ]; then title="$(jq -r .pull_request.title < ${{github.event_path}} )" description='This change was automatically created from a PR' @@ -111,6 +118,7 @@ runs: --ticket-link "$ticket_link" \ $code_changes_arg \ $tf_plan_output_arg \ + $tags_arg \ --log '${{ inputs.log }}' \ $app_arg \ ${{ inputs.plan-json }} \