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

Commit

Permalink
Adding PR URL communication
Browse files Browse the repository at this point in the history
  • Loading branch information
yhakbar committed May 13, 2024
1 parent a6cbc15 commit fd3130b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
20 changes: 20 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,23 @@ 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_NUMBER: ${{ steps.get_pr_number.outputs.pr_number }}
CREATED_PR_URL: ${{ steps.create_pr.outputs.pull-request-url }}
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_NUMBER" \
-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

Now that you've created your account, you're ready to review and merge the baseline pull request.

This is the pull request that contains the initial resources you need in a new account to have it ready for use.

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

0 comments on commit fd3130b

Please sign in to comment.