Skip to content

Commit 6ae54b8

Browse files
committed
fix: [#119] it always returns true after creating jobs
1 parent 1b59d26 commit 6ae54b8

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

dist/index.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ async function run(): Promise<void> {
9999
const job = await queue.createJob(inputs.jobPayload)
100100

101101
await core.group(`Setting outputs`, async () => {
102-
context.setOutput('job_created', true)
102+
context.setOutput('job_created', !job.getCommitHash().isNull())
103103
context.setOutput('job_commit', job.getCommitHash().toString())
104104

105-
core.info(`job_created: true`)
105+
core.info(`job_created: ${!job.getCommitHash().isNull()}`)
106106
core.info(`job_commit: ${job.getCommitHash().toString()}`)
107107
})
108108

@@ -129,10 +129,10 @@ async function run(): Promise<void> {
129129
const commit = await queue.markJobAsStarted(inputs.jobPayload)
130130

131131
await core.group(`Setting outputs`, async () => {
132-
context.setOutput('job_started', true)
132+
context.setOutput('job_started', !commit.hash.isNull())
133133
context.setOutput('job_commit', commit.hash.toString())
134134

135-
core.info(`job_started: true`)
135+
core.info(`job_started: ${!commit.hash.isNull()}`)
136136
core.info(`job_commit: ${commit.hash.toString()}`)
137137
})
138138

@@ -142,10 +142,10 @@ async function run(): Promise<void> {
142142
const commit = await queue.markJobAsFinished(inputs.jobPayload)
143143

144144
await core.group(`Setting outputs`, async () => {
145-
context.setOutput('job_finished', true)
145+
context.setOutput('job_finished', !commit.hash.isNull())
146146
context.setOutput('job_commit', commit.hash.toString())
147147

148-
core.info(`job_finished: true`)
148+
core.info(`job_finished: ${!commit.hash.isNull()}`)
149149
core.info(`job_commit: ${commit.hash.toString()}`)
150150
})
151151

0 commit comments

Comments
 (0)