28 lines
658 B
JavaScript
28 lines
658 B
JavaScript
|
import core from "@actions/core";
|
||
|
|
||
|
import gitea from "gitea-api";
|
||
|
|
||
|
async function run() {
|
||
|
try {
|
||
|
const host = core.getInput("host");
|
||
|
const token = core.getInput("token");
|
||
|
const repository = core.getInput("repository");
|
||
|
|
||
|
const [owner, repo] = repository.split("/");
|
||
|
|
||
|
const gitea_client = new gitea.GiteaApi({
|
||
|
BASE: `https://${host}/api/v1`,
|
||
|
WITH_CREDENTIALS: true,
|
||
|
TOKEN: token,
|
||
|
});
|
||
|
|
||
|
console.log(`TEST ${host} ${token} ${repository} ${owner} ${repo}`);
|
||
|
// console.log(`🎉 Release ready at ${response.html_url}`);
|
||
|
} catch (error) {
|
||
|
console.log(error);
|
||
|
core.setFailed(error.message);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
run();
|