Skip to content

Commit

Permalink
Add clarifying comments
Browse files Browse the repository at this point in the history
b/290997541
  • Loading branch information
oxve committed Jul 19, 2023
1 parent 9e014ca commit e32ece9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/unit_test_report.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Upload Unit Test Results

on:
# This workflow must be triggered via `workflow_run` to be able to access
# secrets, which is not possible from a workflow triggered by a PR in a fork.
workflow_run:
workflows:
- linux
Expand Down Expand Up @@ -36,6 +38,12 @@ jobs:
console.log('context.payload.workflow_run.pull_requests', context.payload.workflow_run.pull_requests);
console.log('context.payload.workflow_run.head_commit', context.payload.workflow_run.head_commit);
// The `download-artifact` action can only access artifacts that
// were uploaded in the same workflow. Since it was not this
// workflow that uploaded the artifacts we must use rest api
// to download them.
// https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down Expand Up @@ -83,6 +91,7 @@ jobs:
# TODO
# DD_METRICS:

# Git info
DD_GIT_COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
DD_GIT_REPOSITORY_URL: ${{ github.event.repository.git_url }}

Expand Down

0 comments on commit e32ece9

Please sign in to comment.