House Keeping #689
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: House Keeping | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 6 * * *" # Every day at 6:00am UTC | |
env: | |
API_SECRET: ${{ secrets.API_SECRET }} | |
jobs: | |
clean: | |
name: "Clean" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Mark inactive polls as deleted | |
run: | | |
curl -X "POST" --fail "https://app.rallly.co/api/house-keeping/delete-inactive-polls" \ | |
-H "Authorization: Bearer ${API_SECRET}" \ | |
- name: Remove deleted polls | |
run: | | |
curl -X "POST" --fail "https://app.rallly.co/api/house-keeping/remove-deleted-polls" \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer ${API_SECRET}" \ | |
-d '{"take": 1000}' |