Skip to content

House Keeping

House Keeping #794

Workflow file for this run

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}'