Auto-delete expired domains #969
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: Auto-delete expired domains | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Warn domains expiring in 1 month | |
run: | | |
export DATE=$(date -d "$(date -d "1 month") 1 year ago") | |
export EXPIRY="will expire in 1 month" | |
./scripts/expiring.sh | |
- name: Warn domains expiring in 1 week | |
run: | | |
export DATE=$(date -d "$(date -d "1 week") 1 year ago") | |
export EXPIRY="will expire next week" | |
./scripts/expiring.sh | |
- name: Warn domains expiring in 1 day | |
run: | | |
export DATE=$(date -d "$(date -d "1 day") 1 year ago") | |
export EXPIRY="expires tomorrow" | |
./scripts/expiring.sh | |
- name: Delete domains older than 1 year | |
run: | | |
export DATE=$(date -d "1 year ago") | |
./scripts/expired.sh | |
- name: Commit any changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Delete expired domains |