Skip to content

Commit 2091861

Browse files
Gracefully shut down intermediary container during database image builds (#76)
1 parent c2e1a83 commit 2091861

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/run_db_trigger.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ on:
3535
required: true
3636
SLACK_WEBHOOK_URL:
3737
required: true
38+
DB_IMAGE_MARIADB_ROOT_PASSWORD:
39+
required: true
3840

3941
env:
4042
REGISTRY: ghcr.io
@@ -100,8 +102,9 @@ jobs:
100102
exit 1
101103
fi
102104
103-
- name: Stop the intermediary container
104-
run: docker stop "${{ steps.container.outputs.id }}"
105+
- name: Gracefully shutdown the intermediary container
106+
run: docker exec -i "${{ steps.container.outputs.id }}" mysqladmin -u root -p${{ secrets.DB_IMAGE_MARIADB_ROOT_PASSWORD }} shutdown
107+
continue-on-error: true
105108

106109
- name: Download the DB image dockerfile
107110
run: curl -o Dockerfile.seed https://raw.githubusercontent.com/dpc-sdp/github-actions/main/.docker/Dockerfile.seed

0 commit comments

Comments
 (0)