Skip to content
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
27 changes: 27 additions & 0 deletions .github/workflows/nightly-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dispatch to the consul-k8s-workflows with a nightly cron
name: nightly-cleanup
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Run nightly at 12PM UTC/8AM EST/5AM PST
- cron: '0 12 * * *'

# these should be the only settings that you will ever need to change
env:
CONSUL_IMAGE: "not used"
BRANCH: ${{ github.ref_name }}
CONTEXT: "nightly"

jobs:
cleanup:
name: cleanup
runs-on: ubuntu-latest
steps:
- uses: benc-uk/workflow-dispatch@v1.2.2
name: cleanup
with:
workflow: cleanup.yml
repo: hashicorp/consul-k8s-workflows
ref: main
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
inputs: '{ "context":"${{ env.CONTEXT }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ github.sha }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}", "consul-image":"${{ env.CONSUL_IMAGE }}" }'