12 lines
314 B
JavaScript
12 lines
314 B
JavaScript
module.exports = async ({ github, context }) => {
|
|
const { data: runs } = await github.rest.actions.listWorkflowRuns({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
workflow_id: "build.yml",
|
|
branch: "main",
|
|
status: "success",
|
|
per_page: 1,
|
|
});
|
|
return runs.workflow_runs[0].id;
|
|
};
|