Skip to content

Commit 505208f

Browse files
committed
chore: refactor
1 parent e35ef4f commit 505208f

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/_helpers.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
import { action, Job, JobConfig } from "ghats";
22

33
export type SetupJobConfig = Omit<JobConfig, "runsOn"> & {
4-
withoutCheckout?: boolean;
54
withBun?: boolean;
65
};
76

87
export function setupJob(id: string, config: SetupJobConfig): Job {
98
const job = new Job(id, { runsOn: "ubuntu-latest", ...config });
109

11-
if (!config.withoutCheckout) {
12-
job.uses(
13-
action("actions/checkout", { with: { "persist-credentials": "false" } }),
14-
);
15-
}
10+
job.uses(
11+
action("actions/checkout", { with: { "persist-credentials": "false" } }),
12+
);
1613

1714
if (config.withBun) {
1815
job

.github/workflows/release-please.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { action, Workflow } from "ghats";
1+
import { action, Job, Workflow } from "ghats";
22
import { setupJob } from "./_helpers";
33

44
const workflow = new Workflow("Release Please", {
@@ -12,8 +12,8 @@ const workflow = new Workflow("Release Please", {
1212
},
1313
});
1414

15-
const releasePleaseJob = setupJob("releasePlease", {
16-
withoutCheckout: true,
15+
const releasePleaseJob = new Job("releasePlease", {
16+
runsOn: "ubuntu-latest",
1717
timeoutMinutes: 10,
1818
permissions: {
1919
contents: "write",

0 commit comments

Comments
 (0)