-
Notifications
You must be signed in to change notification settings - Fork 462
38 lines (33 loc) · 1.14 KB
/
code-cover-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: PR code coverage (publish)
on:
workflow_run:
workflows: [ "PR code coverage (generate)" ]
types: [ "completed" ]
jobs:
# This job downloads the artifacts generated by the code-cover-gen job and
# uploads them to a GCS bucket, from where Reviewable can access them.
code-cover-publish:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: 'Download artifact'
uses: actions/download-artifact@v4
with:
name: cover
path: cover
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.CODECOVER_SERVICE_ACCOUNT_KEY }}'
- name: 'Upload to GCS'
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: 'cover'
glob: '**/cover-*.json'
parent: false
destination: 'crl-codecover-public/pr-pebble/'
process_gcloudignore: false