Skip to content

Commit efab11c

Browse files
authored
Update blank.yml
1 parent 8bb2cd5 commit efab11c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/blank.yml

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

0 commit comments

Comments
 (0)