Skip to content

Commit 31259b2

Browse files
committed
Update workflows to avoid failing PR-content-check workflow.
Update the trigger events of ion-test-driver and ion-java-performance-regression-detection workflows. Update the output of PR-content-check.
1 parent 1424c5c commit 31259b2

3 files changed

Lines changed: 22 additions & 15 deletions

File tree

.github/workflows/PR-content-check.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@
33

44
name: PR Content Check
55

6-
on: [pull_request]
6+
on:
7+
workflow_call:
8+
outputs:
9+
result:
10+
description: "The result of PR content check"
11+
value: ${{ jobs.check-PR-content.outputs.output1 }}
712

813
jobs:
914
check-PR-content:
1015
name: Check PR Content
1116

1217
runs-on: ubuntu-latest
1318

19+
outputs:
20+
output1: ${{ steps.check-content.outputs.result }}
21+
1422
steps:
1523
- name: Checkout the incoming pull request
1624
uses: actions/checkout@v3
@@ -23,4 +31,4 @@ jobs:
2331
id: check-content
2432
run: |
2533
cd ion-java-new
26-
if [[ $(git log -1 --name-only) == *"src/"* ]]; then echo "result=pass"; else exit 1; fi
34+
if [[ $(git log -1 --name-only) == *"src/"* ]]; then echo "result=pass" >> $GITHUB_OUTPUT; else echo "result=fail" >> $GITHUB_OUTPUT; fi

.github/workflows/ion-java-performance-regression-detector.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33

44
name: Ion Java performance regression detector
55

6-
on:
7-
workflow_run:
8-
workflows: [ PR Content Check ]
9-
types:
10-
- completed
6+
on: [pull_request]
117

128
jobs:
9+
PR-Content-Check:
10+
uses: amazon-ion/ion-java/.github/workflows/PR-content-check.yml@master
11+
1312
detect-regression:
1413
name: Detect Regression
15-
needs: check-PR-content
16-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
14+
needs: PR-Content-Check
15+
if: ${{ needs.PR-Content-Check.outputs.result == 'pass' }}
1716
runs-on: ubuntu-latest
1817

1918
steps:

.github/workflows/ion-test-driver.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: ion-test-driver
22

3-
on:
4-
workflow_run:
5-
workflows: [ PR Content Check ]
6-
types:
7-
- completed
3+
on: [pull_request]
84

95
jobs:
6+
PR-Content-Check:
7+
uses: amazon-ion/ion-java/.github/workflows/PR-content-check.yml@master
8+
109
ion-test-driver:
1110
runs-on: macos-10.15
12-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
11+
needs: PR-Content-Check
12+
if: ${{ needs.PR-Content-Check.outputs.result == 'pass' }}
1313
steps:
1414
- name: Checkout ion-java
1515
uses: actions/checkout@master

0 commit comments

Comments
 (0)