Skip to content

Commit 7017e8e

Browse files
committed
run workflows if PR is approved
1 parent ffa6f7e commit 7017e8e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/workflows/mysql.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
name: mysql demo db build
2-
on: pull_request
2+
on:
3+
pull_request_review:
4+
types: [submitted]
35

46
jobs:
57
mimic-iv-mysql:
8+
# only run if PR is approved
9+
if: github.event.review.state == 'approved'
610
runs-on: ubuntu-22.04
11+
needs: approved
712

813
steps:
914
- name: Check out repository code

.github/workflows/psql.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
name: psql demo db build
2-
on: pull_request
2+
on:
3+
pull_request_review:
4+
types: [submitted]
35

46
jobs:
57
mimic-iv-psql:
6-
# Containers must run in Linux based operating systems
8+
# only run if PR is approved
9+
if: github.event.review.state == 'approved'
710
runs-on: ubuntu-latest
8-
# Docker Hub image that `container-job` executes in
911
container: node:latest
1012

11-
# Service containers to run with `container-job`
1213
services:
1314
# Label used to access the service container
1415
postgres:
1516
# Docker Hub image
1617
image: postgres
17-
# Provide the password for postgres
1818
env:
1919
POSTGRES_PASSWORD: postgres
2020
# Set health checks to wait until postgres has started
@@ -59,7 +59,6 @@ jobs:
5959
fi
6060
6161
env:
62-
# The hostname used to communicate with the PostgreSQL service container
6362
POSTGRES_HOST: postgres
6463
PGPASSWORD: postgres
6564
BUILDCODE_PATH: mimic-iv/buildmimic/postgres

0 commit comments

Comments
 (0)