Skip to content

Get the latest workflow run from GitHub Actions using the Octokit API #25451

Answered by dawidd6
courtneycb asked this question in Actions
Discussion options

You must be logged in to vote

There should probably be something like:

octokit.actions.listWorkflowRuns({
    owner: owner,
    repo: repo-name,
    workflow_id: "tests.yml",
    per_page: 1,
});

or similar. This should give you the latest run for given workflow.

octokit.github.io

octokit/rest.js

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants