-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.22 KB
/
delete_old_cloudformation_stacks.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
28
29
30
31
32
33
34
35
36
37
38
39
40
name: 'Delete old cloudformation stacks'
# Controls when the action will run - in this case triggered manually
on:
workflow_dispatch:
schedule:
- cron: "0 0,12 * * *"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "combine-prs"
delete-old-cloudformation-stacks:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout local github scripts
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
sparse-checkout: |
.github/scripts
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
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 }}