After a release starts, someone usually opens Actions, looks for the right tag and checks whether production actually ran. A green workflow can have a skipped production job. The agent can save that lookup once and reuse it whenever someone asks about a release.
Name the job that delivers the release
Set the workflow filename and the exact production job name in the example. It assumes your existing pipeline starts deployments with workflow_dispatch at a tag and reports the tag as the run’s head branch.
Pass the release the caller cares about
Define owner, repo, releaseTag and commit as required text inputs. Take the full commit from the reviewed release record. Two releases can point to the same commit. The action checks both the tag and SHA.
Look up the run and check its production job
Save the action below. It searches the most recent 100 deployment runs. A unique match gives it a run ID for the job lookup. If two dispatches match, the agent receives both links to resolve the ambiguity.
check-release.ts
// Use the tag and full commit ID from your release record.
const { owner, repo, releaseTag, commit } = defineParams(
z.object({
owner: z.string(),
repo: z.string(),
releaseTag: z.string(),
commit: z.string(),
}),
);
// Look for a manual deployment of this exact release.
const recent = await github.listWorkflowRuns({
owner,
repo,
actionId: "deploy.yml",
maxResults: 100,
});
const matches = recent.filter(
(run) =>
run.event === "workflow_dispatch" &&
run.headBranch === releaseTag &&
run.headSha === commit,
);
// Return the candidate links if the run cannot be identified uniquely.
if (matches.length !== 1) {
return {
outcome: matches.length ? "ambiguous" : "no_match",
releaseTag,
commit,
candidates: matches.map((run) => run.htmlUrl),
};
}
// Find the production job inside the matching run.
const run = matches[0];
const jobs = await github.listWorkflowJobs({
owner,
repo,
runId: run.id,
filter: "latest",
maxResults: 100,
});
const deploy = jobs.find((job) => job.name === "deploy-production");
const receipt = {
releaseTag,
commit,
runId: run.id,
url: run.htmlUrl,
job: deploy?.htmlUrl ?? null,
jobConclusion: deploy?.conclusion ?? null,
};
// Start a live check only after both the run and production job succeed.
if (run.status !== "completed") return { ...receipt, outcome: "pending" };
const passed =
run.conclusion === "success" && deploy?.conclusion === "success";
return { ...receipt, outcome: passed ? "ready_for_live_check" : "review" };Inspect tool types
github.listWorkflowRuns(args: {
owner: string;
repo: string;
actionId?: string | number;
branch?: string;
status?: string;
maxResults?: number;
}): Promise<Array<{ id: number; name: string | null; status: string | null; conclusion: string | null; headBranch: string | null; headSha: string; event: string; htmlUrl: string; runNumber: number; createdAt: string; updatedAt: string }>>github.listWorkflowJobs(args: {
owner: string;
repo: string;
runId: number;
filter?: string;
maxResults?: number;
}): Promise<Array<{ id: number; runId: number; name: string; status: string; conclusion: string | null; startedAt: string | null; completedAt: string | null; htmlUrl: string; runnerName: string | null; steps: Array<{ name: string; status: string; conclusion: string | null; number: number }> }>>Continue from the returned status
A pending run can be checked again with the same inputs. A skipped or failed production job goes to review. When the job succeeds, the agent can check the build ID served by the application and run its browser smoke test.
One release, three possible answers
Suppose the agent asks about v1.4.0 and supplies the commit recorded for that tag.
| Run evidence | Result | Next step |
|---|---|---|
| Production is waiting for approval | pending | Wait for the release owner. |
| Workflow succeeded, production was skipped | review | Open the run and check the job condition. |
| Workflow and production job succeeded | ready_for_live_check | Verify the version serving traffic. |
The run and job links travel with the answer. The agent can use them directly if the release needs attention.
Test it before the next run
Choose a release with a known deployment outcome.
- Compare the action result with the production job for that tag.
- Supply a different commit and check that the action reports no_match.
- Replay on the next release. If your pipeline changes its production job, update the action and test both job names before saving the next version.
Check the result
- Did the action select the intended release?
- Did a skipped job reach review?
Common questions
Does it start another deployment?
The action uses two read calls. Run it again as often as you need a status update.
What does no_match mean?
The latest 100 runs contained no manual dispatch for that tag and commit. Check the release record and older runs before considering another deployment.
Does a passing job prove the new version is live?
The job tells you GitHub finished the production step. Check a release-specific marker at the destination to confirm the deployed version.
Sources and service documentation
Provider documentation supports the service behaviour described here. The proposed workflow and illustrative examples are OrgSDK designs.
- GitHub workflow runs API ↗
The event, tag and commit used to match a deployment run.
- GitHub workflow jobs API ↗
Job status, conclusion and links for the chosen run.
