forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 1
27 lines (24 loc) · 939 Bytes
/
erase_db.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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: 'false'
run: |
docker volume rm dspace-${{env.INSTANCE}}_pgdata dspace-${{env.INSTANCE}}_assetstore
- name: redeploy
if: 'false'
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\"}"