Skip to content

Commit c9b6c1e

Browse files
authored
ci: update h-k workflows to used labeled on pull_requests (#3750)
1 parent ca18657 commit c9b6c1e

File tree

7 files changed

+76
-83
lines changed

7 files changed

+76
-83
lines changed

.github/workflows/healthcare-consent.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/healthcare-consent.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'healthcare/consent/**'
27-
- '.github/workflows/healthcare-consent.yaml'
28-
- '.github/workflows/test.yaml'
29-
pull_request_target:
30-
types: [labeled]
25+
types:
26+
- opened
27+
- reopened
28+
- synchronize
29+
- labeled
3130
paths:
3231
- 'healthcare/consent/**'
3332
- '.github/workflows/healthcare-consent.yaml'
3433
- '.github/workflows/test.yaml'
3534
schedule:
36-
- cron: '0 0 * * 0'
35+
- cron: '0 0 * * 0'
3736
jobs:
3837
test:
3938
permissions:

.github/workflows/healthcare-datasets.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/healthcare-datasets.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'healthcare/datasets/**'
27-
- '.github/workflows/healthcare-datasets.yaml'
28-
- '.github/workflows/test.yaml'
29-
pull_request_target:
30-
types: [labeled]
25+
types:
26+
- opened
27+
- reopened
28+
- synchronize
29+
- labeled
3130
paths:
3231
- 'healthcare/datasets/**'
3332
- '.github/workflows/healthcare-datasets.yaml'
3433
- '.github/workflows/test.yaml'
3534
schedule:
36-
- cron: '0 0 * * 0'
35+
- cron: '0 0 * * 0'
3736
jobs:
3837
test:
3938
permissions:

.github/workflows/healthcare-dicom.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/healthcare-dicom.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'healthcare/dicom/**'
27-
- '.github/workflows/healthcare-dicom.yaml'
28-
- '.github/workflows/test.yaml'
29-
pull_request_target:
30-
types: [labeled]
25+
types:
26+
- opened
27+
- reopened
28+
- synchronize
29+
- labeled
3130
paths:
3231
- 'healthcare/dicom/**'
3332
- '.github/workflows/healthcare-dicom.yaml'
3433
- '.github/workflows/test.yaml'
3534
schedule:
36-
- cron: '0 0 * * 0'
35+
- cron: '0 0 * * 0'
3736
jobs:
3837
test:
3938
permissions:

.github/workflows/healthcare-fhir.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/healthcare-fhir.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'healthcare/fhir/**'
27-
- '.github/workflows/healthcare-fhir.yaml'
28-
- '.github/workflows/test.yaml'
29-
pull_request_target:
30-
types: [labeled]
25+
types:
26+
- opened
27+
- reopened
28+
- synchronize
29+
- labeled
3130
paths:
3231
- 'healthcare/fhir/**'
3332
- '.github/workflows/healthcare-fhir.yaml'
3433
- '.github/workflows/test.yaml'
3534
schedule:
36-
- cron: '0 0 * * 0'
35+
- cron: '0 0 * * 0'
3736
jobs:
3837
test:
3938
permissions:

.github/workflows/healthcare-hl7v2.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/healthcare-hl7v2.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'healthcare/hl7v2/**'
27-
- '.github/workflows/healthcare-hl7v2.yaml'
28-
- '.github/workflows/test.yaml'
29-
pull_request_target:
30-
types: [labeled]
25+
types:
26+
- opened
27+
- reopened
28+
- synchronize
29+
- labeled
3130
paths:
3231
- 'healthcare/hl7v2/**'
3332
- '.github/workflows/healthcare-hl7v2.yaml'
3433
- '.github/workflows/test.yaml'
3534
schedule:
36-
- cron: '0 0 * * 0'
35+
- cron: '0 0 * * 0'
3736
jobs:
3837
test:
3938
permissions:

.github/workflows/iam-deny.yaml

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ on:
2121
- 'iam/deny/**'
2222
- '.github/workflows/iam-deny.yaml'
2323
pull_request:
24-
paths:
25-
- 'iam/deny/**'
26-
- '.github/workflows/iam-deny.yaml'
27-
pull_request_target:
28-
types: [labeled]
24+
types:
25+
- opened
26+
- reopened
27+
- synchronize
28+
- labeled
2929
paths:
3030
- 'iam/deny/**'
3131
- '.github/workflows/iam-deny.yaml'
3232
schedule:
33-
- cron: '0 0 * * 0'
33+
- cron: '0 0 * * 0'
3434
jobs:
3535
test:
3636
permissions:
3737
contents: 'read'
38-
id-token: 'write'
38+
id-token: 'write'
3939
if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run'
4040
runs-on: ubuntu-latest
4141
timeout-minutes: 120
@@ -44,50 +44,49 @@ jobs:
4444
working-directory: 'iam/deny'
4545
steps:
4646
- uses: actions/[email protected]
47-
with:
48-
ref: ${{github.event.pull_request.head.sha}}
47+
with:
48+
ref: ${{github.event.pull_request.head.sha}}
4949
- uses: 'google-github-actions/[email protected]'
50-
with:
51-
workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider'
52-
service_account: '[email protected]'
53-
create_credentials_file: 'true'
54-
access_token_lifetime: 600s
50+
with:
51+
workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider'
52+
service_account: '[email protected]'
53+
create_credentials_file: 'true'
54+
access_token_lifetime: 600s
5555
- uses: actions/[email protected]
56-
with:
57-
node-version: 16
56+
with:
57+
node-version: 16
5858
- name: Get npm cache directory
59-
id: npm-cache-dir
60-
shell: bash
61-
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
59+
id: npm-cache-dir
60+
shell: bash
61+
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
6262
- uses: actions/cache@v3
63-
id: npm-cache
64-
with:
65-
path: ${{ steps.npm-cache-dir.outputs.dir }}
66-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
67-
restore-keys: |
68-
${{ runner.os }}-node-
63+
id: npm-cache
64+
with:
65+
path: ${{ steps.npm-cache-dir.outputs.dir }}
66+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
67+
restore-keys: "${{ runner.os }}-node- \n"
6968
- name: install repo dependencies
70-
run: npm install
71-
working-directory: .
69+
run: npm install
70+
working-directory: .
7271
- name: install directory dependencies
73-
run: npm install
72+
run: npm install
7473
- run: npm run build --if-present
7574
- name: set env vars for scheduled run
76-
if: github.event.action == 'schedule'
77-
run: |
78-
echo "MOCHA_REPORTER_SUITENAME=iam-deny" >> $GITHUB_ENV
79-
echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
80-
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
75+
if: github.event.action == 'schedule'
76+
run: |
77+
echo "MOCHA_REPORTER_SUITENAME=iam-deny" >> $GITHUB_ENV
78+
echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
79+
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
8180
- run: npm test
8281
- name: upload test results for FlakyBot workflow
83-
if: github.event.action == 'schedule' && always()
84-
uses: actions/upload-artifact@v3
85-
env:
86-
MOCHA_REPORTER_OUTPUT: "${{github.run_id}}_sponge_log.xml"
87-
with:
88-
name: test-results
89-
path: iam/deny/${{ env.MOCHA_REPORTER_OUTPUT }}
90-
retention-days: 1
82+
if: github.event.action == 'schedule' && always()
83+
uses: actions/upload-artifact@v3
84+
env:
85+
MOCHA_REPORTER_OUTPUT: "${{github.run_id}}_sponge_log.xml"
86+
with:
87+
name: test-results
88+
path: iam/deny/${{ env.MOCHA_REPORTER_OUTPUT }}
89+
retention-days: 1
9190
flakybot:
9291
permissions:
9392
contents: 'read'

.github/workflows/kms.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/kms.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'kms/**'
27-
- '.github/workflows/kms.yaml'
28-
- '.github/workflows/test.yaml'
29-
pull_request_target:
30-
types: [labeled]
25+
types:
26+
- opened
27+
- reopened
28+
- synchronize
29+
- labeled
3130
paths:
3231
- 'kms/**'
3332
- '.github/workflows/kms.yaml'
3433
- '.github/workflows/test.yaml'
3534
schedule:
36-
- cron: '0 0 * * 0'
35+
- cron: '0 0 * * 0'
3736
jobs:
3837
test:
3938
permissions:

0 commit comments

Comments
 (0)