Skip to content

Commit

Permalink
Allow manual kickoff of aws-nuke (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Jun 29, 2021
1 parent e505dba commit b6f7d66
Showing 1 changed file with 10 additions and 4 deletions.
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

0 comments on commit b6f7d66

Please sign in to comment.