mirror of
https://gitea.com/actions/gitea-release-action.git
synced 2024-11-21 17:49:38 +01:00
fix: bool value parse
This commit is contained in:
parent
1d562cf526
commit
f119011bd6
2 changed files with 16 additions and 8 deletions
12
dist/index.js
vendored
12
dist/index.js
vendored
|
@ -48144,6 +48144,10 @@ var crypto_js = __nccwpck_require__(4134);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getIsTrue(v) {
|
||||||
|
const trueValue = ['true', 'True', 'TRUE']
|
||||||
|
return trueValue.includes(v)
|
||||||
|
}
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
|
@ -48151,14 +48155,14 @@ async function run() {
|
||||||
const name = core.getInput("name")
|
const name = core.getInput("name")
|
||||||
const body = getReleaseBody(core.getInput("body"), core.getInput("body_path"))
|
const body = getReleaseBody(core.getInput("body"), core.getInput("body_path"))
|
||||||
const tag_name = core.getInput("tag_name")
|
const tag_name = core.getInput("tag_name")
|
||||||
const draft = core.getInput("draft") === 'true'
|
const draft = getIsTrue(core.getInput("draft"))
|
||||||
const prerelease = core.getInput("prerelease") === 'true'
|
const prerelease = getIsTrue(core.getInput("prerelease"))
|
||||||
const files = core.getInput("files")
|
const files = core.getInput("files")
|
||||||
const repository = core.getInput("repository")
|
const repository = core.getInput("repository")
|
||||||
const token = core.getInput("token")
|
const token = core.getInput("token")
|
||||||
const target_commitish = core.getInput("target_commitish")
|
const target_commitish = core.getInput("target_commitish")
|
||||||
const md5sum = core.getInput("md5sum")
|
const md5sum = getIsTrue(core.getInput("md5sum"))
|
||||||
const sha256sum = core.getInput("sha256sum")
|
const sha256sum = getIsTrue(core.getInput("sha256sum"))
|
||||||
|
|
||||||
const [owner, repo] = (repository).split("/")
|
const [owner, repo] = (repository).split("/")
|
||||||
|
|
||||||
|
|
12
main.js
12
main.js
|
@ -8,6 +8,10 @@ import gitea from "gitea-api";
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import CryptoJS from 'crypto-js';
|
import CryptoJS from 'crypto-js';
|
||||||
|
|
||||||
|
function getIsTrue(v) {
|
||||||
|
const trueValue = ['true', 'True', 'TRUE']
|
||||||
|
return trueValue.includes(v)
|
||||||
|
}
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
|
@ -15,14 +19,14 @@ async function run() {
|
||||||
const name = core.getInput("name")
|
const name = core.getInput("name")
|
||||||
const body = getReleaseBody(core.getInput("body"), core.getInput("body_path"))
|
const body = getReleaseBody(core.getInput("body"), core.getInput("body_path"))
|
||||||
const tag_name = core.getInput("tag_name")
|
const tag_name = core.getInput("tag_name")
|
||||||
const draft = core.getInput("draft") === 'true'
|
const draft = getIsTrue(core.getInput("draft"))
|
||||||
const prerelease = core.getInput("prerelease") === 'true'
|
const prerelease = getIsTrue(core.getInput("prerelease"))
|
||||||
const files = core.getInput("files")
|
const files = core.getInput("files")
|
||||||
const repository = core.getInput("repository")
|
const repository = core.getInput("repository")
|
||||||
const token = core.getInput("token")
|
const token = core.getInput("token")
|
||||||
const target_commitish = core.getInput("target_commitish")
|
const target_commitish = core.getInput("target_commitish")
|
||||||
const md5sum = core.getInput("md5sum")
|
const md5sum = getIsTrue(core.getInput("md5sum"))
|
||||||
const sha256sum = core.getInput("sha256sum")
|
const sha256sum = getIsTrue(core.getInput("sha256sum"))
|
||||||
|
|
||||||
const [owner, repo] = (repository).split("/")
|
const [owner, repo] = (repository).split("/")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue