CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /**
* `gluecron/checkout@v1` — idiomatic no-op.
*
* The runner (Agent 5) has already checked out the repo into `ctx.workspace`
* before any `uses:` step executes. This action exists so users can write
* the familiar `- uses: gluecron/checkout@v1` line without surprise. It
* records the resolved commit sha as an output so downstream steps can
* reference it via `steps.<id>.outputs.sha`.
*/
import type { ActionHandler } from "../action-registry";
export const checkoutAction: ActionHandler = {
name: "gluecron/checkout",
version: "v1",
async run(ctx) {
try {
const sha = ctx.commitSha || "";
return {
exitCode: 0,
outputs: { sha },
stdout: `Checked out ${sha || "HEAD"} at ${ctx.workspace}`,
};
} catch (err) {
return {
exitCode: 1,
stderr: err instanceof Error ? err.message : String(err),
};
}
},
};
|