Skip to content

Commit

Permalink
Printing out more run/job metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
CatChen committed Jun 17, 2024
1 parent b7add4f commit aca7711
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
7 changes: 6 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,18 @@ async function handlePullRequest(pullRequestNumber: number) {
endGroup();

const jobs = await getWorkflowRunJobs(owner, repo, octokit);
info(`Current workflow name: ${context.workflow}`);
info(`Current run id: ${context.runId}`);
info(`Current run number: ${context.runNumber}`);
info(
`Current run attempt: ${parseInt(process.env.GITHUB_RUN_ATTEMPT as string, 10)}`,
); // context.runAttempt in the future release of @actions/github
info(`Current job static id: ${context.job}`);
info(`Current step static id: ${context.action}`);
info(`Jobs in current Workflow: ${jobs.length}`);
for (const job of jobs) {
info(` Job id: ${job.id} (${job.html_url})`);
info(` Job name: ${job.name}`);
info(` Job run id/attempt: ${job.run_id}-${job.run_attempt}`);
if (job.steps !== undefined) {
startGroup(` Job steps: ${job.steps.length}`);
for (const step of job.steps) {
Expand Down

0 comments on commit aca7711

Please sign in to comment.