aws-nuke #995
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: 'aws-nuke' | |
on: | |
# Enable manual runs | |
workflow_dispatch: | |
inputs: | |
delete: | |
description: 'Set to "true" to actually delete stuff' | |
required: true | |
default: 'false' | |
# Enable pull request for testing | |
pull_request: | |
types: [opened, synchronize, reopened] | |
# Nuke testing account nightly | |
schedule: | |
# Run at noon UTC, 4 or 5am PT | |
- cron: '0 12 * * *' | |
jobs: | |
# Run aws-nuke simulation (don't actually delete anything) | |
dry-run: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.delete != 'true' ) | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: aws-nuke | |
uses: "docker://quay.io/rebuy/aws-nuke:v2.19.0" | |
with: | |
args: "--config .github/aws-nuke.yaml --force" | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" | |
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" | |
# Run aws-nuke "for reals" (delete everything) | |
no-dry-run: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.delete == 'true' ) | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: aws-nuke | |
uses: "docker://quay.io/rebuy/aws-nuke:v2.19.0" | |
with: | |
args: "--config .github/aws-nuke.yaml --force --no-dry-run" | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" | |
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" |