Skip to content

Commit 48aa8d7

Browse files
Update ml CI workflow checkout ref to be PR commit (#1114) (#1115)
Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 0db87a7) Co-authored-by: Peter Zhu <[email protected]>
1 parent 78c5110 commit 48aa8d7

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/CI-workflow.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,16 @@ jobs:
3636
aws-region: us-west-2
3737

3838
- name: Checkout MLCommons
39-
uses: actions/checkout@v2
39+
uses: actions/checkout@v3
40+
with:
41+
ref: ${{ github.event.pull_request.head.sha }}
4042

4143
- name: Build and Run Tests
4244
run: |
45+
export OPENAI_KEY=$(aws secretsmanager get-secret-value --secret-id github_openai_key --query SecretString --output text)
46+
export COHERE_KEY=$(aws secretsmanager get-secret-value --secret-id github_cohere_key --query SecretString --output text)
47+
echo "::add-mask::$OPENAI_KEY"
48+
echo "::add-mask::$COHERE_KEY"
4349
./gradlew build
4450
- name: Publish to Maven Local
4551
run: |
@@ -122,17 +128,23 @@ jobs:
122128
with:
123129
java-version: ${{ matrix.java }}
124130

125-
# - uses: aws-actions/configure-aws-credentials@v2
126-
# with:
127-
# role-to-assume: ${{ secrets.ML_ROLE }}
128-
# aws-region: us-west-2
131+
- uses: aws-actions/configure-aws-credentials@v2
132+
with:
133+
role-to-assume: ${{ secrets.ML_ROLE }}
134+
aws-region: us-west-2
129135

130136
# ml-commons
131137
- name: Checkout MLCommons
132-
uses: actions/checkout@v2
138+
uses: actions/checkout@v3
139+
with:
140+
ref: ${{ github.event.pull_request.head.sha }}
133141

134142
- name: Build and Run Tests
135143
run: |
144+
export OPENAI_KEY=$(aws secretsmanager get-secret-value --secret-id github_openai_key --query SecretString --output text)
145+
export COHERE_KEY=$(aws secretsmanager get-secret-value --secret-id github_cohere_key --query SecretString --output text)
146+
echo "::add-mask::$OPENAI_KEY"
147+
echo "::add-mask::$COHERE_KEY"
136148
./gradlew.bat build
137149
- name: Publish to Maven Local
138150
run: |

0 commit comments

Comments
 (0)