Skip to content

Commit 3be8972

Browse files
committed
Initial commit
1 parent a14eaff commit 3be8972

File tree

3 files changed

+10998
-2834
lines changed

3 files changed

+10998
-2834
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 'Delete old cloudformation stacks'
2+
3+
# Controls when the action will run - in this case triggered manually
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 2,14 * * *"
8+
9+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
10+
jobs:
11+
# This workflow contains a single job called "combine-prs"
12+
delete-old-cloudformation-stacks:
13+
# The type of runner that the job will run on
14+
runs-on: ubuntu-22.04
15+
permissions:
16+
id-token: write
17+
contents: read
18+
19+
# Steps represent a sequence of tasks that will be executed as part of the job
20+
steps:
21+
- name: Checkout local github scripts
22+
uses: actions/checkout@v4
23+
with:
24+
ref: ${{ env.BRANCH_NAME }}
25+
sparse-checkout: |
26+
.github/scripts
27+
28+
- name: Configure AWS Credentials
29+
uses: aws-actions/configure-aws-credentials@v4
30+
with:
31+
aws-region: eu-west-2
32+
role-to-assume: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
33+
role-session-name: epsam-delete-old-cloudformation-stacks
34+
35+
- name: delete stacks
36+
shell: bash
37+
working-directory: .github/scripts
38+
run: ./delete_stacks.sh
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)