destroy old attack ranges #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |