chore(deps): upgrade dependencies #782
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: Destroy | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
destroy: | |
name: Destroy Preview Environment | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Configure Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: eu-west-1 | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
role-session-name: github-actions-session | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Set CDK Application Stage | |
id: stage | |
run: | | |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then | |
echo ::set-output name=stage::"prod" | |
else | |
echo ::set-output name=stage::"pr-${{ github.event.number }}" | |
fi | |
- name: Destroy. | |
run: npx cdk destroy --context stage=${{ steps.stage.outputs.stage }} --force | |
- name: Delete GitHub Deployments and Environment | |
uses: strumwolf/delete-deployment-environment@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
environment: ${{ steps.stage.outputs.stage }} |