File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 schedule :
66 - cron : 0 14 * * 0
7+ push :
78
89jobs :
10+ check :
11+ runs-on : ubuntu-latest
12+ outputs :
13+ cache_hit : ${{ steps.db_cache.outputs.cache-hit }}
14+ steps :
15+ - uses : actions/checkout@v6
16+ - name : Restore database cache
17+ uses : actions/cache/restore@v5
18+ id : db_cache
19+ with :
20+ path : cache-dump.sql
21+ key : db-${{ runner.os }}-${{ hashFiles('**/migrations/*.py') }}
22+
923 dump :
1024 runs-on : ubuntu-latest
25+ needs : check
26+ if : needs.check.outputs.cache_hit == 'false'
1127 steps :
1228 - uses : actions/checkout@v6
1329 - name : Start database
2440 - name : Run migrations
2541 run : python manage.py migrate --skip-checks # due to django-cms issue
2642 - name : Create database dump
27- run : docker compose -f compose-dev.yaml exec db pg_dump -U fragdenstaat_de fragdenstaat_de | gzip > dump.gz
43+ run : docker compose -f compose-dev.yaml exec db pg_dump -U fragdenstaat_de fragdenstaat_de > cache- dump.sql
2844 - name : Save dump
2945 uses : actions/cache/save@v5
3046 with :
31- path : dump.gz
32- key : ${{ runner.os }}-${{ hashFiles('compose-dev.yaml ') }}
47+ path : cache- dump.sql
48+ key : db- ${{ runner.os }}-${{ hashFiles('**/migrations/*.py ') }}
You can’t perform that action at this time.
0 commit comments