Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from gruntwork-io/dev-127/feat/link-baseline-pr…
Browse files Browse the repository at this point in the history
…-when-creating-account

Adding PR URL communication
  • Loading branch information
yhakbar authored May 14, 2024
2 parents a6cbc15 + 8759f36 commit 80aa6ac
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
21 changes: 21 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,24 @@ runs:
2. Merge this pull request.
Once merged, Gruntwork Pipelines will `terragrunt apply` the baseline in the newly created AWS account(s).
- name: "[ProvisionAccount]: Communicate PR URL"
shell: bash
if: ${{ steps.gruntwork_context.outputs.terragrunt_command == 'apply' }}
env:
ACTION_PATH: ${{ github.action_path }}
MERGED_PR_URL: https://github.com/${{ github.repository }}/pull/${{ steps.get_pr_number.outputs.pr_number }}
CREATED_PR_URL: ${{ steps.create_pr.outputs.pull-request-url }}
GH_TOKEN: ${{ inputs.INFRA_ROOT_WRITE_TOKEN }}
run: |
boilerplate \
--template-url "$ACTION_PATH/templates/step-summary" \
--output-folder "." \
--var PullRequestURL="$CREATED_PR_URL"
cat step-summary.md >> "$GITHUB_STEP_SUMMARY"
gh pr comment "$MERGED_PR_URL" \
-F step-summary.md
rm -f step-summary.md
4 changes: 4 additions & 0 deletions templates/step-summary/boilerplate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
variables:
- name: PullRequestURL
description: The URL for the pull request created as part of account creation
type: string
7 changes: 7 additions & 0 deletions templates/step-summary/step-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Baseline Pull Request 🚧

Account provisioning complete! 🎉

A baseline pull request has been created to provision the initial resources you need in a new account to have it ready for production workloads.

To see the pull request, click [here]({{ .PullRequestURL }}).

0 comments on commit 80aa6ac

Please sign in to comment.