Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: set attempts to workflowRunURL #346

Merged
merged 1 commit into from
May 28, 2024

Conversation

crazy-max
Copy link
Member

We should set the number of attempts in the workflow run URL otherwise builder-id in provenance could be inaccurate.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max requested a review from tonistiigi May 27, 2024 17:59
@crazy-max crazy-max merged commit 2941f52 into docker:main May 28, 2024
44 checks passed
@crazy-max crazy-max deleted the gh-workflow-run-retries branch May 28, 2024 07:44
@@ -65,7 +65,9 @@ export class GitHub {
}

static get workflowRunURL(): string {
return `${GitHub.serverURL}/${github.context.repo.owner}/${github.context.repo.repo}/actions/runs/${github.context.runId}`;
const runID = process.env.GITHUB_RUN_ID || github.context.runId;
const runAttempt = process.env.GITHUB_RUN_ATTEMPT || 1;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fyi "run attempt" is not yet part of github context but will be in a future release of @actions/github package: actions/toolkit@faa4254

Keep that in mind for follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant