Skip to content

Commit

Permalink
Remove docker
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Sep 25, 2023
1 parent 7542b61 commit aa0ac5e
Show file tree
Hide file tree
Showing 1,493 changed files with 1,264,151 additions and 11,673 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
tsconfig.tsbuildinfo

.github/styles/*
Expand Down
18 changes: 0 additions & 18 deletions Dockerfile

This file was deleted.

14 changes: 2 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,5 @@ inputs:
default: ${{ github.token }}

runs:
using: docker
image: Dockerfile
args:
- ${{ inputs.version }}
- ${{ inputs.files }}
- ${{ inputs.debug }}
- ${{ inputs.reporter }}
- ${{ inputs.fail_on_error }}
- ${{ inputs.level }}
- ${{ inputs.filter_mode }}
- ${{ inputs.vale_flags }}
- ${{ inputs.separator }}
using: "node20"
main: "lib/main.js"
11 changes: 0 additions & 11 deletions jest.config.js

This file was deleted.

16 changes: 11 additions & 5 deletions lib/input.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand All @@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Expand Down Expand Up @@ -59,7 +63,8 @@ function logIfDebug(msg) {
*/
function get(tok, dir) {
return __awaiter(this, void 0, void 0, function* () {
const localVale = yield install_1.installLint(core.getInput('version'));
const localVale = yield (0, install_1.installLint)(core.getInput('version'));
const localReviewDog = yield (0, install_1.installReviewDog)("0.15.0");
const valeFlags = core.getInput("vale_flags");
let version = '';
yield exec.exec(localVale, ['-v'], {
Expand Down Expand Up @@ -110,12 +115,13 @@ function get(tok, dir) {
args.push('.');
}
}
logIfDebug(`Vale set-up complete; using '${args}'.`);
logIfDebug(`Vale set-up complete; using '${args}' with ${localReviewDog}.`);
return {
token: tok,
workspace: dir,
exePath: localVale,
args: args
args: args,
reviewdogPath: localReviewDog,
};
});
}
Expand Down
38 changes: 29 additions & 9 deletions lib/install.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand All @@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Expand All @@ -31,22 +35,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.installLint = void 0;
exports.installReviewDog = exports.installLint = void 0;
const core = __importStar(require("@actions/core"));
const tc = __importStar(require("@actions/tool-cache"));
const request = __importStar(require("request-promise-native"));
const node_fetch_1 = __importDefault(require("node-fetch"));
const path_1 = __importDefault(require("path"));
const releases = 'https://github.com/errata-ai/vale/releases/download';
const last = 'https://github.com/errata-ai/vale/releases/latest/';
function installLint(version) {
return __awaiter(this, void 0, void 0, function* () {
core.info(`Installing Vale version '${version}' ...`);
if (version === 'latest') {
yield request.get(last, function (e, response) {
const vs = response.request.uri.href;
const parts = vs.split(`/`);
version = parts[parts.length - 1].substring(1);
});
const response = yield (0, node_fetch_1.default)(last);
const vs = response.url;
const parts = vs.split(`/`);
version = parts[parts.length - 1].substring(1);
}
const url = releases + `/v${version}/vale_${version}_Linux_64-bit.tar.gz`;
const archivePath = yield tc.downloadTool(url);
Expand All @@ -62,3 +65,20 @@ function installLint(version) {
});
}
exports.installLint = installLint;
function installReviewDog(version) {
return __awaiter(this, void 0, void 0, function* () {
core.info(`Installing ReviewDog version '${version}' ...`);
const url = `https://github.com/reviewdog/reviewdog/releases/download/v${version}/reviewdog_${version}_Linux_x86_64.tar.gz`;
const archivePath = yield tc.downloadTool(url);
let extractedDir = '';
const args = ['xz'];
if (process.platform.toString() != 'darwin') {
args.push('--overwrite');
}
extractedDir = yield tc.extractTar(archivePath, process.env.HOME, args);
const reviewdogPath = path_1.default.join(extractedDir, `reviewdog`);
core.info(`Installed version '${version}' into '${reviewdogPath}'.`);
return reviewdogPath;
});
}
exports.installReviewDog = installReviewDog;
10 changes: 7 additions & 3 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand All @@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Expand Down Expand Up @@ -54,7 +58,7 @@ function run(actionInput) {
const should_fail = core.getInput('fail_on_error');
// Pipe to reviewdog ...
process.env['REVIEWDOG_GITHUB_API_TOKEN'] = core.getInput('token');
return yield exec.exec('/bin/reviewdog', [
return yield exec.exec(actionInput.reviewdogPath, [
'-f=rdjsonl',
`-name=vale`,
`-reporter=${core.getInput('reporter')}`,
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/ncc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/prettier

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/tsc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/tsserver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aa0ac5e

Please sign in to comment.