Skip to content

Commit 4f313ac

Browse files
authored
Update blank.yml
1 parent 35051b1 commit 4f313ac

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/blank.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,28 @@ jobs:
4040
run: |
4141
echo Add more actions to build,
4242
echo "test, and deploy your project(s)."
43+
44+
# Get details link
45+
- name: Get "ci/prow/e2e" details link
46+
id: get-check
47+
uses: actions/github-script@v6
48+
with:
49+
script: |
50+
// Use the PR head commit SHA
51+
const sha = context.payload.pull_request.head.sha;
52+
// Fetch check runs for this commit, filtering by check name
53+
const { data } = await github.checks.listForRef({
54+
owner: context.repo.owner,
55+
repo: context.repo.repo,
56+
ref: sha,
57+
check_name: 'ci/prow/e2e'
58+
});
59+
60+
if (data.total_count === 0) {
61+
core.info('No check runs found with name "ci/prow/e2e"');
62+
} else {
63+
// Assume the first matching check run is the one we want
64+
const checkRun = data.check_runs[0];
65+
core.setOutput('details_link', checkRun.details_url);
66+
core.info(`Found details URL: ${checkRun.details_url}`);
67+
}

0 commit comments

Comments
 (0)