PR code coverage (publish) #2558
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |