2023-03-29 14:51:45 +02:00
|
|
|
name: Heroku Postgres Reset
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2023-03-29 15:11:53 +02:00
|
|
|
schedule:
|
|
|
|
# run every day at midnight
|
|
|
|
- cron: "0 0 * * *"
|
2023-03-29 14:51:45 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
reset-postgres:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-10-05 10:19:57 +02:00
|
|
|
uses: actions/checkout@v4
|
2023-03-29 14:51:45 +02:00
|
|
|
|
|
|
|
- name: Install Heroku CLI
|
2024-01-10 20:51:41 +01:00
|
|
|
uses: akhileshns/heroku-deploy@v3.13.15
|
2023-03-29 14:51:45 +02:00
|
|
|
with:
|
|
|
|
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
|
2023-03-29 14:55:40 +02:00
|
|
|
heroku_email: ${{ secrets.HEROKU_EMAIL }}
|
2023-03-29 15:11:53 +02:00
|
|
|
justlogin: true
|
2023-03-29 14:51:45 +02:00
|
|
|
- name: Reset Postgres
|
|
|
|
run: |
|
|
|
|
heroku pg:reset DATABASE --app unleash --confirm unleash
|