Skip to content

Commit

Permalink
fix: ci: params
Browse files Browse the repository at this point in the history
  • Loading branch information
Panakotta00 committed Oct 28, 2024
1 parent 4d2bc26 commit 37d5015
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/send-discord-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ on:
workflow_dispatch:
inputs:
ping:
required: true
type: boolean
default: false
verify-no-draft:
verify_no_draft:
required: true
type: boolean
default: false
workflow_call:
inputs:
verify-no-draft:
verify_no_draft:
type: boolean
default: true
ping:
Expand Down Expand Up @@ -45,7 +47,8 @@ jobs:
per_page: 1,
});
const release = response.data[0];
if (${{inputs.verify-no-draft}} && release.draft) {
var inputs = ${{ toJSON(inputs) }};
if (inputs.verify_no_draft && release.draft) {
core.setFailed('Found Release is a draft!');
return;
}
Expand All @@ -64,7 +67,8 @@ jobs:
let version = process.env.version;
let split = body.split(/\n(.*)/s);
split.splice(1, 0, `_(${version})_\n`);
if (${{inputs.ping}}) {
var inputs = ${{ toJSON(inputs) }};
if (inputs.ping) {
split.push("\n\n<@&1018202499678736446>");
}
let msg = split.join("");
Expand Down

0 comments on commit 37d5015

Please sign in to comment.