-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: try post-job check run creation to preserve details URL
Co-Authored-By: Aaron <AJ> Steers <[email protected]>
- Loading branch information
1 parent
bf16122
commit 6e19ef8
Showing
1 changed file
with
21 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,23 +8,38 @@ on: | |
- '.github/workflows/dummy_check_result.yml' | ||
|
||
jobs: | ||
test_check: | ||
name: "Test Check" | ||
main_job: | ||
name: "Main Job" | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
run_id: ${{ steps.get_run.outputs.run_id }} | ||
steps: | ||
- name: Get Run ID | ||
id: get_run | ||
run: echo "run_id=${{ github.run_id }}" >> $GITHUB_OUTPUT | ||
- name: Simulate Work | ||
run: | | ||
echo "Doing some work..." | ||
sleep 5 | ||
post_check: | ||
needs: main_job | ||
name: "Post Check" | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
checks: write | ||
contents: read | ||
steps: | ||
- name: Create Independent Check Run | ||
- name: Create Post-Job Check Run | ||
uses: LouisBrunner/[email protected] | ||
with: | ||
token: ${{ github.token }} | ||
name: "External Test Report Link" | ||
name: "Test Report Link (Post-Job)" | ||
status: completed | ||
conclusion: failure | ||
details_url: "https://www.google.com/search?q=test-failure" | ||
output: | | ||
{ | ||
"title": "External Test Report", | ||
"summary": "Click 'Details' to view the external test report." | ||
"title": "Test Report", | ||
"summary": "This check was created after the main job completed.\nClick 'Details' to view the test report." | ||
} |