Skip to content

Commit

Permalink
Linux env
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Oct 16, 2019
1 parent 47afb89 commit e2e8f9d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ Following inputs can be used as `step.with` keys
| `x` | Bool | `false` | Prints the build commands as compilation progresses |
| `ldflags` | String | | Arguments to pass on each go tool link invocation |

## :warning: Limitation

This action is only available for Linux [virtual environments](https://help.github.com/en/articles/virtual-environments-for-github-actions#supported-virtual-environments-and-hardware-resources).

## 🤝 How can I help ?

All kinds of contributions are welcome :raised_hands:!<br />
Expand Down
5 changes: 5 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const installer = __importStar(require("./installer"));
const os = __importStar(require("os"));
const child_process = __importStar(require("child_process"));
const core = __importStar(require("@actions/core"));
const exec = __importStar(require("@actions/exec"));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
if (os.platform() !== 'linux') {
core.setFailed('Only supported on linux platform');
return;
}
const workspace = process.env['GITHUB_WORKSPACE'] || '.';
const xgo_version = core.getInput('xgo_version') || 'latest';
const go_version = core.getInput('go_version');
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import * as installer from './installer';
import * as os from 'os';
import * as child_process from 'child_process';
import * as core from '@actions/core';
import * as exec from '@actions/exec';

async function run() {
try {
if (os.platform() !== 'linux') {
core.setFailed('Only supported on linux platform');
return;
}

const workspace = process.env['GITHUB_WORKSPACE'] || '.';
const xgo_version = core.getInput('xgo_version') || 'latest';
const go_version = core.getInput('go_version');
Expand Down

0 comments on commit e2e8f9d

Please sign in to comment.