mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-16 12:41:48 +00:00
More testing
This commit is contained in:
parent
cd87a7e4b4
commit
9a42bf633e
1 changed files with 21 additions and 18 deletions
39
index.js
39
index.js
|
|
@ -63,24 +63,27 @@ async function downloadGofmt(octokit, version, versionPrefix, org, repo) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log("Failed to find a release matching the criteria.")
|
||||||
throw "Failed to find a release matching the criteria."
|
throw "Failed to find a release matching the criteria."
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
async function main() {
|
||||||
// versionPrefix is the prefix of the version gotestfmt-action supports.
|
try {
|
||||||
const versionPrefix = "v1."
|
// versionPrefix is the prefix of the version gotestfmt-action supports.
|
||||||
const token = core.getInput('token');
|
const versionPrefix = "v1."
|
||||||
const version = core.getInput('version');
|
const token = core.getInput('token');
|
||||||
const org = core.getInput("org")
|
const version = core.getInput('version');
|
||||||
const repo = core.getInput("repo")
|
const org = core.getInput("org")
|
||||||
const octokit = new Octokit({
|
const repo = core.getInput("repo")
|
||||||
auth: token,
|
const octokit = new Octokit({
|
||||||
})
|
auth: token,
|
||||||
downloadGofmt(octokit, version, versionPrefix, org, repo).then(function () {
|
})
|
||||||
console.log("Download successful.")
|
await downloadGofmt(octokit, version, versionPrefix, org, repo)
|
||||||
}).catch(reason => function() {
|
console.log("Setup complete.")
|
||||||
core.setFailed(reason);
|
} catch (error) {
|
||||||
})
|
console.log("Setup failed.")
|
||||||
} catch (error) {
|
core.setFailed(error);
|
||||||
core.setFailed(error.message);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue