Skip to content

Commit 997bf90

Browse files
authored
ci: update s-z workflows to use labeled on pull_request trigger (#3752)
1 parent 6de13a9 commit 997bf90

13 files changed

+88
-100
lines changed

.github/workflows/scheduler.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/scheduler.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'scheduler/**'
27-
- '.github/workflows/scheduler.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
- 'scheduler/**'
3332
- '.github/workflows/scheduler.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/secret-manager.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/secret-manager.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'secret-manager/**'
27-
- '.github/workflows/secret-manager.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
- 'secret-manager/**'
3332
- '.github/workflows/secret-manager.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/security-center-snippets.yaml

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

.github/workflows/service-directory-snippets.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/service-directory-snippets.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'service-directory/snippets/**'
27-
- '.github/workflows/service-directory-snippets.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
- 'service-directory/snippets/**'
3332
- '.github/workflows/service-directory-snippets.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/speech.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/speech.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'speech/**'
27-
- '.github/workflows/speech.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
- 'speech/**'
3332
- '.github/workflows/speech.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/storagetransfer.yaml

+10-11
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ on:
2121
- 'storagetransfer/**'
2222
- '.github/workflows/storagetransfer.yaml'
2323
pull_request:
24-
paths:
25-
- 'storagetransfer/**'
26-
- '.github/workflows/storagetransfer.yaml'
27-
pull_request_target:
28-
types: [labeled]
24+
types:
25+
- opened
26+
- reopened
27+
- synchronize
28+
- labeled
2929
paths:
3030
- 'storagetransfer/**'
3131
- '.github/workflows/storagetransfer.yaml'
3232
schedule:
33-
- cron: '0 0 * * 0'
33+
- cron: '0 0 * * 0'
3434
jobs:
3535
test:
3636
permissions:
@@ -64,14 +64,13 @@ jobs:
6464
- name: Get npm cache directory
6565
id: npm-cache-dir
6666
shell: bash
67-
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
67+
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
6868
- uses: actions/cache@v3
6969
id: npm-cache
7070
with:
7171
path: ${{ steps.npm-cache-dir.outputs.dir }}
7272
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
73-
restore-keys: |
74-
${{ runner.os }}-node-
73+
restore-keys: "${{ runner.os }}-node- \n"
7574
- name: install repo dependencies
7675
run: npm install
7776
working-directory: .
@@ -86,7 +85,7 @@ jobs:
8685
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
8786
- run: npm test
8887
env:
89-
AWS_ACCESS_KEY_ID : ${{ fromJSON(steps.secrets.outputs.sts_aws_secret).AccessKeyId }}
88+
AWS_ACCESS_KEY_ID: ${{ fromJSON(steps.secrets.outputs.sts_aws_secret).AccessKeyId }}
9089
AWS_SECRET_ACCESS_KEY: ${{ fromJSON(steps.secrets.outputs.sts_aws_secret).SecretAccessKey }}
9190
AZURE_STORAGE_ACCOUNT: ${{ fromJSON(steps.secrets.outputs.sts_azure_secret).StorageAccount }}
9291
AZURE_CONNECTION_STRING: ${{ fromJSON(steps.secrets.outputs.sts_azure_secret).ConnectionString }}
@@ -99,7 +98,7 @@ jobs:
9998
with:
10099
name: test-results
101100
path: storagetransfer/${{ env.MOCHA_REPORTER_OUTPUT }}
102-
retention-days: 1
101+
retention-days: 1
103102
flakybot:
104103
permissions:
105104
contents: 'read'

.github/workflows/talent.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/talent.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'talent/**'
27-
- '.github/workflows/talent.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
- 'talent/**'
3332
- '.github/workflows/talent.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/texttospeech.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/texttospeech.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'texttospeech/**'
27-
- '.github/workflows/texttospeech.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
- 'texttospeech/**'
3332
- '.github/workflows/texttospeech.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/translate.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/translate.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'translate/**'
27-
- '.github/workflows/translate.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
- 'translate/**'
3332
- '.github/workflows/translate.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/video-intelligence.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/video-intelligence.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'video-intelligence/**'
27-
- '.github/workflows/video-intelligence.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
- 'video-intelligence/**'
3332
- '.github/workflows/video-intelligence.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/vision-productSearch.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ on:
2222
- '.github/workflows/vision-productSearch.yaml'
2323
- '.github/workflows/test.yaml'
2424
pull_request:
25-
paths:
26-
- 'vision/productSearch/**'
27-
- '.github/workflows/vision-productSearch.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
- 'vision/productSearch/**'
3332
- '.github/workflows/vision-productSearch.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/vision.yaml

+10-11
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ on:
2121
- 'vision/**'
2222
- '.github/workflows/vision.yaml'
2323
pull_request:
24-
paths:
25-
- 'vision/**'
26-
- '.github/workflows/vision.yaml'
27-
pull_request_target:
28-
types: [labeled]
24+
types:
25+
- opened
26+
- reopened
27+
- synchronize
28+
- labeled
2929
paths:
3030
- 'vision/**'
3131
- '.github/workflows/vision.yaml'
3232
schedule:
33-
- cron: '0 0 * * 0'
33+
- cron: '0 0 * * 0'
3434
jobs:
3535
test:
3636
permissions:
@@ -63,14 +63,13 @@ jobs:
6363
- name: Get npm cache directory
6464
id: npm-cache-dir
6565
shell: bash
66-
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
66+
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
6767
- uses: actions/cache@v3
6868
id: npm-cache
6969
with:
7070
path: ${{ steps.npm-cache-dir.outputs.dir }}
7171
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
72-
restore-keys: |
73-
${{ runner.os }}-node-
72+
restore-keys: "${{ runner.os }}-node- \n"
7473
- name: install repo dependencies
7574
run: npm install
7675
working-directory: .
@@ -85,7 +84,7 @@ jobs:
8584
echo "MOCHA_REPORTER=xunit" >> $GITHUB_ENV
8685
- run: npm test
8786
env:
88-
REDIS_HOST: ${{ steps.secrets.outputs.vision.REDIS_HOST }}
87+
REDIS_HOST: ${{ steps.secrets.outputs.vision.REDIS_HOST }}
8988
- name: upload test results for FlakyBot workflow
9089
if: github.event.action == 'schedule' && always()
9190
uses: actions/upload-artifact@v3
@@ -94,7 +93,7 @@ jobs:
9493
with:
9594
name: test-results
9695
path: vision/${{ env.MOCHA_REPORTER_OUTPUT }}
97-
retention-days: 1
96+
retention-days: 1
9897
flakybot:
9998
permissions:
10099
contents: 'read'

0 commit comments

Comments
 (0)