-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdelete_old_cloudformation_stacks.yml
More file actions
72 lines (63 loc) · 2.07 KB
/
delete_old_cloudformation_stacks.yml
File metadata and controls
72 lines (63 loc) · 2.07 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: "Delete old cloudformation stacks"
on:
workflow_dispatch:
inputs:
branch_name:
description: "Branch to run against, defaults to main"
required: false
default: "main"
schedule:
- cron: "0 0,12 * * *"
push:
branches: [main]
permissions: {}
jobs:
delete-old-cloudformation-stacks:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: Checkout local github scripts
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
ref: ${{ github.event.inputs.branch_name || github.ref_name }}
persist-credentials: false
sparse-checkout: |
.github/scripts
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37
with:
aws-region: eu-west-2
role-to-assume: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
role-session-name: aws-pfp-delete-old-stacks
- name: delete stacks
shell: bash
working-directory: .github/scripts
run: ./delete_stacks.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
delete-old-proxygen-deployments:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: Checkout local code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
ref: ${{ github.event.inputs.branch_name || github.ref_name }}
persist-credentials: false
fetch-depth: 0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37
with:
aws-region: eu-west-2
role-to-assume: ${{ secrets.PROXYGEN_PTL_ROLE }}
role-session-name: pfp-delete-old-proxygen
- name: delete proxygen deployments
shell: bash
working-directory: .github/scripts
run: ./delete_proxygen_deployments.sh
env:
GITHUB_TOKEN: ${{ github.token }}