@@ -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