Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update h-k workflows to use labeled on pull_request trigger #3750

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/healthcare-consent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ on:
- '.github/workflows/healthcare-consent.yaml'
- '.github/workflows/test.yaml'
pull_request:
paths:
- 'healthcare/consent/**'
- '.github/workflows/healthcare-consent.yaml'
- '.github/workflows/test.yaml'
pull_request_target:
types: [labeled]
types:
- opened
- reopened
- synchronize
- labeled
paths:
- 'healthcare/consent/**'
- '.github/workflows/healthcare-consent.yaml'
- '.github/workflows/test.yaml'
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 0'
jobs:
test:
permissions:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/healthcare-datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ on:
- '.github/workflows/healthcare-datasets.yaml'
- '.github/workflows/test.yaml'
pull_request:
paths:
- 'healthcare/datasets/**'
- '.github/workflows/healthcare-datasets.yaml'
- '.github/workflows/test.yaml'
pull_request_target:
types: [labeled]
types:
- opened
- reopened
- synchronize
- labeled
paths:
- 'healthcare/datasets/**'
- '.github/workflows/healthcare-datasets.yaml'
- '.github/workflows/test.yaml'
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 0'
jobs:
test:
permissions:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/healthcare-dicom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ on:
- '.github/workflows/healthcare-dicom.yaml'
- '.github/workflows/test.yaml'
pull_request:
paths:
- 'healthcare/dicom/**'
- '.github/workflows/healthcare-dicom.yaml'
- '.github/workflows/test.yaml'
pull_request_target:
types: [labeled]
types:
- opened
- reopened
- synchronize
- labeled
paths:
- 'healthcare/dicom/**'
- '.github/workflows/healthcare-dicom.yaml'
- '.github/workflows/test.yaml'
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 0'
jobs:
test:
permissions:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/healthcare-fhir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ on:
- '.github/workflows/healthcare-fhir.yaml'
- '.github/workflows/test.yaml'
pull_request:
paths:
- 'healthcare/fhir/**'
- '.github/workflows/healthcare-fhir.yaml'
- '.github/workflows/test.yaml'
pull_request_target:
types: [labeled]
types:
- opened
- reopened
- synchronize
- labeled
paths:
- 'healthcare/fhir/**'
- '.github/workflows/healthcare-fhir.yaml'
- '.github/workflows/test.yaml'
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 0'
jobs:
test:
permissions:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/healthcare-hl7v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ on:
- '.github/workflows/healthcare-hl7v2.yaml'
- '.github/workflows/test.yaml'
pull_request:
paths:
- 'healthcare/hl7v2/**'
- '.github/workflows/healthcare-hl7v2.yaml'
- '.github/workflows/test.yaml'
pull_request_target:
types: [labeled]
types:
- opened
- reopened
- synchronize
- labeled
paths:
- 'healthcare/hl7v2/**'
- '.github/workflows/healthcare-hl7v2.yaml'
- '.github/workflows/test.yaml'
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 0'
jobs:
test:
permissions:
Expand Down
81 changes: 40 additions & 41 deletions .github/workflows/iam-deny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ on:
- 'iam/deny/**'
- '.github/workflows/iam-deny.yaml'
pull_request:
paths:
- 'iam/deny/**'
- '.github/workflows/iam-deny.yaml'
pull_request_target:
types: [labeled]
types:
- opened
- reopened
- synchronize
- labeled
paths:
- 'iam/deny/**'
- '.github/workflows/iam-deny.yaml'
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 0'
jobs:
test:
permissions:
contents: 'read'
id-token: 'write'
id-token: 'write'
if: github.event.action != 'labeled' || github.event.label.name == 'actions:force-run'
runs-on: ubuntu-latest
timeout-minutes: 120
Expand All @@ -44,50 +44,49 @@ jobs:
working-directory: 'iam/deny'
steps:
- uses: actions/[email protected]
with:
ref: ${{github.event.pull_request.head.sha}}
with:
ref: ${{github.event.pull_request.head.sha}}
- uses: 'google-github-actions/[email protected]'
with:
workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider'
service_account: '[email protected]'
create_credentials_file: 'true'
access_token_lifetime: 600s
with:
workload_identity_provider: 'projects/949737848314/locations/global/workloadIdentityPools/iam-deny-test-pool/providers/iam-deny-test-provider'
service_account: '[email protected]'
create_credentials_file: 'true'
access_token_lifetime: 600s
- uses: actions/[email protected]
with:
node-version: 16
with:
node-version: 16
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: "${{ runner.os }}-node- \n"
- name: install repo dependencies
run: npm install
working-directory: .
run: npm install
working-directory: .
- name: install directory dependencies
run: npm install
run: npm install
- run: npm run build --if-present
- name: set env vars for scheduled run
if: github.event.action == 'schedule'
run: |
echo "MOCHA_REPORTER_SUITENAME=iam-deny" >> $GITHUB_ENV
echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
if: github.event.action == 'schedule'
run: |
echo "MOCHA_REPORTER_SUITENAME=iam-deny" >> $GITHUB_ENV
echo "MOCHA_REPORTER_OUTPUT=${{github.run_id}}_sponge_log.xml" >> $GITHUB_ENV
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
- run: npm test
- name: upload test results for FlakyBot workflow
if: github.event.action == 'schedule' && always()
uses: actions/upload-artifact@v3
env:
MOCHA_REPORTER_OUTPUT: "${{github.run_id}}_sponge_log.xml"
with:
name: test-results
path: iam/deny/${{ env.MOCHA_REPORTER_OUTPUT }}
retention-days: 1
if: github.event.action == 'schedule' && always()
uses: actions/upload-artifact@v3
env:
MOCHA_REPORTER_OUTPUT: "${{github.run_id}}_sponge_log.xml"
with:
name: test-results
path: iam/deny/${{ env.MOCHA_REPORTER_OUTPUT }}
retention-days: 1
flakybot:
permissions:
contents: 'read'
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/kms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ on:
- '.github/workflows/kms.yaml'
- '.github/workflows/test.yaml'
pull_request:
paths:
- 'kms/**'
- '.github/workflows/kms.yaml'
- '.github/workflows/test.yaml'
pull_request_target:
types: [labeled]
types:
- opened
- reopened
- synchronize
- labeled
paths:
- 'kms/**'
- '.github/workflows/kms.yaml'
- '.github/workflows/test.yaml'
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 0'
jobs:
test:
permissions:
Expand Down
Loading