forked from splunk/attack_range
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 1.12 KB
/
destroy_old_attack_ranges.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
name: destroy old attack ranges
on:
schedule:
- cron: '15 13 * * *'
jobs:
destroy_old_attack_ranges:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install System Packages
run: |
sudo apt update -qq
- uses: actions/setup-python@v5
with:
python-version: '3.9' #Available versions here - https://github.com/actions/python-versions/releases easy to change/make a matrix/use pypy
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Install Dependencies using Poetry
run: |
pip3 install poetry
poetry install
- name: Destroy and stop old attack ranges
run: |
poetry run python scripts/attack_range_destroyer.py
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}