Erase database #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Erase database | |
on: | |
workflow_dispatch: | |
jobs: | |
restart_db: | |
env: | |
INSTANCE: 5 | |
runs-on: dspace-dep-1 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: false | |
- name: stop and remove containers | |
run: | | |
docker stop dspacedb$INSTANCE dspace$INSTANCE dspace-angular$INSTANCE | |
docker rm dspacedb$INSTANCE dspace$INSTANCE dspace-angular$INSTANCE | |
- name: remove volumes | |
if: '!cancelled()' | |
run: | | |
docker volume rm dspace-${{env.INSTANCE}}_pgdata dspace-${{env.INSTANCE}}_assetstore | |
- name: redeploy | |
if: '!cancelled()' | |
run: | | |
curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}" --request POST https://api.github.com/repos/dataquest-dev/dspace-angular/actions/workflows/deploy.yml/dispatches --data "{\"ref\":\"refs/heads/dtq-dev\"}" | |