Skip to content

Commit

Permalink
Add workflow_run.id to actions/download-artifact
Browse files Browse the repository at this point in the history
The addition of actions/download-artifact@v4 to
publish-test-results.yaml in #66 still failed:

- https://github.com/mbland/tomcat-servlet-testing-example/actions/runs/7267779677/job/19802307107

What was interesting was the `run-id:` value from the "Download test
results" step:

  Run actions/download-artifact@v4
    with:
      name: test-results
      merge-multiple: false
      repository: mbland/tomcat-servlet-testing-example
      run-id: 7267779677
  Downloading single artifact
  Error: Unable to download artifact(s): Artifact not found for name:
    test-results

followed by this line from "Post test report":

  Action was triggered by workflow_run: using SHA and RUN_ID from
  triggering workflow

So this change attempts to fix the breakage by adding
`github.event.workflow_run.id` to the actions/download-artifact
configuration.
  • Loading branch information
mbland committed Dec 19, 2023
1 parent 01303b1 commit 8630e9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-test-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: test-results
run-id: ${{ github.event.workflow_run.id }}

- name: Post test report
uses: dorny/test-reporter@v1
Expand Down

0 comments on commit 8630e9c

Please sign in to comment.