Skip to content

Commit

Permalink
Update ml CI workflow checkout ref to be PR commit (#1114)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Jul 13, 2023
1 parent 3e56ad5 commit 0db87a7
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/CI-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@ jobs:
aws-region: us-west-2

- name: Checkout MLCommons
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Build and Run Tests
run: |
export OPENAI_KEY=$(aws secretsmanager get-secret-value --secret-id github_openai_key --query SecretString --output text)
export COHERE_KEY=$(aws secretsmanager get-secret-value --secret-id github_cohere_key --query SecretString --output text)
echo "::add-mask::$OPENAI_KEY"
echo "::add-mask::$COHERE_KEY"
./gradlew build
- name: Publish to Maven Local
run: |
Expand Down Expand Up @@ -122,17 +128,23 @@ jobs:
with:
java-version: ${{ matrix.java }}

# - uses: aws-actions/configure-aws-credentials@v2
# with:
# role-to-assume: ${{ secrets.ML_ROLE }}
# aws-region: us-west-2
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.ML_ROLE }}
aws-region: us-west-2

# ml-commons
- name: Checkout MLCommons
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Build and Run Tests
run: |
export OPENAI_KEY=$(aws secretsmanager get-secret-value --secret-id github_openai_key --query SecretString --output text)
export COHERE_KEY=$(aws secretsmanager get-secret-value --secret-id github_cohere_key --query SecretString --output text)
echo "::add-mask::$OPENAI_KEY"
echo "::add-mask::$COHERE_KEY"
./gradlew.bat build
- name: Publish to Maven Local
run: |
Expand Down

0 comments on commit 0db87a7

Please sign in to comment.