ci: retry failing pg migrate step

This commit is contained in:
Nicolas Giard 2023-01-11 23:33:50 -05:00 committed by GitHub
parent 26ef885642
commit af26ff68da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,11 +122,18 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: 'feat/postgres' ref: 'feat/postgres'
- name: Migrate - name: Migrate
run: | uses: nick-fields/retry@v2
chmod +x ./docker/scripts/db-pg-migrate.sh with:
sh ./docker/scripts/db-pg-migrate.sh timeout_minutes: 30
max_attempts: 3
command: |
chmod +x ./docker/scripts/db-pg-migrate.sh
sh ./docker/scripts/db-pg-migrate.sh
on_retry_command: |
psql -U django -h pgdb -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'DROP SCHEMA ietf_utf8 CASCADE;'
rm -f cast.load
- name: Upload DB Dump - name: Upload DB Dump
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3