mybuddy/.github/workflows/demo-reset.yml

24 lines
587 B
YAML
Raw Normal View History

2022-05-22 22:41:06 +00:00
name: Demo reset
on:
2022-06-02 15:56:55 +00:00
# schedule:
# - cron: "0 * * * *"
workflow_dispatch:
2022-05-22 22:41:06 +00:00
jobs:
reset:
name: Reset
runs-on: ubuntu-latest
steps:
2022-06-02 17:29:48 +00:00
- name: Install node v16
uses: actions/setup-node@v3
2022-05-22 22:41:06 +00:00
with:
2022-06-02 17:29:48 +00:00
node-version: 16
- name: Install Railway CLI
run: npm i -g @railway/cli
- name: Reset demo database
run: |
npx railway link $RAILWAY_PROJECT_ID
npx railway run python manage.py reset --no-input
env:
railway_project_id: ${{ secrets.RAILWAY_PROJECT_ID }}
railway_token: ${{ secrets.RAILWAY_TOKEN }}