-
Notifications
You must be signed in to change notification settings - Fork 1
27 lines (27 loc) · 863 Bytes
/
delete.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: Branch Deleted
run-name: Branch Deleted - ${{ github.event.ref }}
on: delete
jobs:
delete:
if: github.event.ref_type == 'branch'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./2-branch-aware-cdk-app
steps:
- name: Checkout Branch
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Configure AWS Creds
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: 'eu-central-1'
- name: Install dependencies
run: npm install
- name: Destroy Stacks
run: npx cdk destroy --all --force --context branch=${{ github.event.ref }}