Skip to content

Commit

Permalink
Change the way run id is referenced in download step. Add more debugg…
Browse files Browse the repository at this point in the history
…ing steps.
  • Loading branch information
afinetooth committed Sep 30, 2024
1 parent b54270f commit 2695fc7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,27 @@ jobs:
echo $binary
chmod +x $binary
$binary --version
- name: Get latest successful run id for ci.yml
id: get_run_id
run: |
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/ci.yml/runs?status=success&branch=master" \
| jq -r '.workflow_runs[0].id'
- name: Echo the run-id
run: |
echo "Run ID: ${{ steps.get_run_id.outputs.run-id }}"
# Download the coverage report generated from ci.yml
- name: Download coverage report
uses: actions/download-artifact@v4
with:
name: coverage-report
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
path: test/
repository: coverallsapp/coverage-reporter
run-id: ${{ steps.get_run_id.outputs.run-id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

# Report coverage with x86_64 binary
- name: Test reporting coverage with x86_64 binary
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,8 @@ jobs:

- name: List uploaded artifacts
run: ls -la coverage/

- name: Debug uploaded artifact
run: |
echo "Artifact URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/"

0 comments on commit 2695fc7

Please sign in to comment.