mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2024-11-06 03:55:48 +00:00
Add problem matcher
This commit is contained in:
parent
886b49b2b3
commit
5f2246e3c5
4 changed files with 28 additions and 7 deletions
16
.github/go.json
vendored
Normal file
16
.github/go.json
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "go",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^([^:]*: )?((.:)?[^:]*):(\\d+)(:(\\d+))?: (.*)$",
|
||||||
|
"file": 2,
|
||||||
|
"line": 4,
|
||||||
|
"column": 6,
|
||||||
|
"message": 7
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
This action sets by Go environment for use in actions by:
|
This action sets by Go environment for use in actions by:
|
||||||
|
|
||||||
- optionally downloading and caching a version of Go
|
- optionally downloading and caching a version of Go
|
||||||
- TODO: registering problem matchers for error output
|
- registering problem matchers for error output
|
||||||
- TODO: configuring proxy if the runner is configured to use a proxy (coming with private runners)
|
- TODO: configuring proxy if the runner is configured to use a proxy (coming with private runners)
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
|
@ -16,7 +16,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
// import * as installer from './installer';
|
const installer = __importStar(require("./installer"));
|
||||||
|
const path = __importStar(require("path"));
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
|
@ -26,10 +27,11 @@ function run() {
|
||||||
//
|
//
|
||||||
const version = core.getInput('version');
|
const version = core.getInput('version');
|
||||||
if (version) {
|
if (version) {
|
||||||
// await installer.getGo(version);
|
yield installer.getGo(version);
|
||||||
}
|
}
|
||||||
// TODO: setup proxy from runner proxy config
|
// TODO: setup proxy from runner proxy config
|
||||||
// TODO: problem matchers registered
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
|
console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
// import * as installer from './installer';
|
import * as installer from './installer';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
|
@ -9,11 +10,13 @@ async function run() {
|
||||||
//
|
//
|
||||||
const version = core.getInput('version');
|
const version = core.getInput('version');
|
||||||
if (version) {
|
if (version) {
|
||||||
// await installer.getGo(version);
|
await installer.getGo(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: setup proxy from runner proxy config
|
// TODO: setup proxy from runner proxy config
|
||||||
// TODO: problem matchers registered
|
|
||||||
|
const matchersPath = path.join(__dirname, '..', '.github');
|
||||||
|
console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue