Upload Linux render tests in separate unprivileged workflow (#1069)
This commit is contained in:
32
.github/workflows/linux-ci.yml
vendored
32
.github/workflows/linux-ci.yml
vendored
@@ -13,11 +13,6 @@ on:
|
||||
- "CMakeLists.txt"
|
||||
- metrics/linux-gcc8-release-style.json
|
||||
|
||||
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
|
||||
permissions:
|
||||
id-token: write # This is required for requesting the JWT (AWS)
|
||||
contents: read # This is required for actions/checkout (AWS)
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
# INFO: We are cancelling the concurrency group if the change is on PR. For workflow dispatch, this will not work.
|
||||
@@ -121,27 +116,8 @@ jobs:
|
||||
id: render_test
|
||||
run: xvfb-run -a ./mbgl-render-test-runner --manifestPath=metrics/linux-gcc8-release-style.json
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
if: ${{ steps.render_test.outcome == 'failure' }}
|
||||
uses: aws-actions/configure-aws-credentials@v2
|
||||
- name: Upload render test result
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
aws-region: us-west-2
|
||||
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
|
||||
role-session-name: ${{ github.run_id }}
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Upload render test results to S3
|
||||
if: ${{ steps.render_test.outcome == 'failure' }}
|
||||
id: upload_render_test_results
|
||||
run: |
|
||||
aws s3 cp metrics/linux-gcc8-release-style.html \
|
||||
s3://maplibre-native-test-artifacts/${{ github.run_id }}-linux-gcc8-release-style.html \
|
||||
--expires "$(date -d '+30 days' --utc +'%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
- name: Make comment with test results
|
||||
if: ${{ steps.upload_render_test_results.outcome == 'success' }}
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
message: |
|
||||
Test results at https://maplibre-native-test-artifacts.s3.eu-central-1.amazonaws.com/${{ github.run_id }}-linux-gcc8-release-style.html
|
||||
name: render-test-result
|
||||
path: metrics/linux-gcc8-release-style.html
|
||||
|
||||
Reference in New Issue
Block a user