File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments