mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2024-12-25 03:55:52 +00:00
Merge pull request #2 from actions/features/matcher
Add problem matcher
This commit is contained in:
commit
61f2387086
4 changed files with 24 additions and 3 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:
|
||||
|
||||
- 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)
|
||||
|
||||
# License
|
||||
|
|
|
@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const installer = __importStar(require("./installer"));
|
||||
const path = __importStar(require("path"));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
|
@ -29,7 +30,8 @@ function run() {
|
|||
yield installer.getGo(version);
|
||||
}
|
||||
// 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) {
|
||||
core.setFailed(error.message);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import * as core from '@actions/core';
|
||||
import * as installer from './installer';
|
||||
import * as path from 'path';
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
|
@ -13,7 +14,9 @@ async function run() {
|
|||
}
|
||||
|
||||
// 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) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue