Skip to content

Commit

Permalink
chore: cancel job when lock enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
FabiLo22 committed Oct 24, 2024
1 parent fbbdb36 commit 1c58aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "typescript-action",
"description": "Givve Automatic Deployment",
"version": "v0.0.10",
"version": "v0.0.11",
"author": "PL Gutscheinsysteme GmbH",
"private": true,
"homepage": "https://github.com/actions/typescript-action",
Expand Down
8 changes: 2 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@ export async function run(): Promise<void> {
await wait(60000)
} else {
// manual deployment lock active. Abort!
core.setOutput('deployment_permitted', false)
core.setFailed('Manual deployment lock active!')
}
} else {
// we can deploy
core.setOutput('deployment_permitted', true)
console.log('yeah baby')
}
} else {
// No lock, we need to lock deployment
Expand All @@ -50,7 +46,7 @@ export async function run(): Promise<void> {
}

// Manual deployment, so deployment is not permitted
core.setOutput('deployment_permitted', false)
core.setFailed('Manual deployment lock active!')
}
} catch (error) {
// Fail the workflow run if an error occurs
Expand Down

0 comments on commit 1c58aa1

Please sign in to comment.