Skip to content

Commit

Permalink
add key value support for /deploy command (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
jterryons authored Dec 17, 2020
1 parent f8c2690 commit 352d4bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
echo NAMESPACE=$(echo $COMMENT_BODY | cut -d' ' -f2) >> $GITHUB_ENV
PARAM_KV_PAIR=$(echo $COMMENT_BODY | cut -d' ' -f3)
IFS='='
arrIN=($PARAM_KV_PAIR)
echo PARAM_KEY=${arrIN[0]} >> $GITHUB_ENV
echo PARAM_VALUE=${arrIN[1]} >> $GITHUB_ENV
unset IFS
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
Expand All @@ -40,5 +46,5 @@ jobs:
- name: Trigger spinnaker
run: |
gcloud pubsub topics publish $SPINNAKER_TOPIC --project $HOST \
--message "{ \"kind\": \"storage#object\", \"name\": \"$IMAGE/$IMAGE-latest.tgz\", \"bucket\": \"$ARTIFACT_BUCKET\", \"parameters\": { \"tag\": \"pr-${{ github.event.issue.number }}\", \"namespace\": \"${{ env.NAMESPACE }}\", \"cluster\": \"dev\", \"actor\": \"$GITHUB_ACTOR\" } }" \
--message "{ \"kind\": \"storage#object\", \"name\": \"$IMAGE/$IMAGE-latest.tgz\", \"bucket\": \"$ARTIFACT_BUCKET\", \"parameters\": { \"tag\": \"pr-${{ github.event.issue.number }}\", \"namespace\": \"${{ env.NAMESPACE }}\", \"cluster\": \"dev\", \"actor\": \"$GITHUB_ACTOR\", \"paramKey\": \"PARAM_KEY\", \"paramValue\": \"$PARAM_VALUE\" } }" \
--attribute ci="actions"

0 comments on commit 352d4bc

Please sign in to comment.