Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow manual kickoff of aws-nuke #119

Merged
merged 1 commit into from
Jun 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/aws-nuke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,26 @@ 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:
- cron: '0 0 * * *'
# 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'
if: github.event_name == 'pull_request' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.delete != 'true' )
steps:
- name: checkout
uses: actions/checkout@v2
Expand All @@ -32,7 +38,7 @@ jobs:
# Run aws-nuke "for reals" (delete everything)
no-dry-run:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.delete == 'true' )
steps:
- name: checkout
uses: actions/checkout@v2
Expand Down