MRKT-215: replaces marketplace home banner #71
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Destory NEWM Tools AWS preview environment when PR is closed | |
on: | |
pull_request: | |
branches: [ master ] | |
types: [ closed ] | |
paths: | |
- .github/workflows/aws-hosting-pull-request-newm-tools.yml | |
- apps/tools/** | |
- packages/** | |
jobs: | |
destroy: | |
name: Destroy NEWM Marketplace AWS preview environment | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # required to interact with GitHub's OIDC Token endpoint. | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: ${{ secrets.AWS_GITHUB_DEPLOY_ROLE_ARN_GARAGE }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Install dependencies | |
run: npm ci --prefix .github/workflows/cdk | |
- name: Destroy preview environment | |
run: | | |
APPNAME=tools QUALIFIER=${{ github.event.pull_request.number }} npm run --prefix .github/workflows/cdk cdk:preview destroy -- --require-approval never | |
- name: Url to PR comment | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
:skull: tools preview environment destroyed | |
allow-repeats: true |