Skip to content

Commit

Permalink
Limit action to ubuntu virt env.
Browse files Browse the repository at this point in the history
  • Loading branch information
q-uint committed Jun 8, 2021
1 parent d28653a commit e867b6c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
with:
dfx-version: 0.7.1
vessel-version: 0.6.1
- run: dfx --version
- run: moc --version
- run: vessel --version
- run: |
dfx --version
moc --version
vessel --version
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

This action sets up a dfx environment, also includes `moc`.

**!** Only supports Ubuntu virtual environments.

## Usage

```yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: allusion-be/setup-dfx@main
with:
dfx-version: 0.7.1
vessel-version: 0.6.1
- run: |
dfx --version
moc --version
vessel --version
```
## Possible Improvements
Expand Down
5 changes: 5 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ exports.run = void 0;
const core = __importStar(__nccwpck_require__(186));
const io = __importStar(__nccwpck_require__(436));
const child_process_1 = __importDefault(__nccwpck_require__(129));
const os_1 = __importDefault(__nccwpck_require__(87));
function run() {
return __awaiter(this, void 0, void 0, function* () {
if (os_1.default.platform() !== 'linux') {
core.setFailed(`Action not supported for: ${os_1.default.platform()} ${os_1.default.arch()}.`);
return;
}
try {
let dfxVersion = core.getInput('dfx-version');
core.info(`Setup dfx version ${dfxVersion}`);
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import * as core from '@actions/core';
import * as io from '@actions/io';
import cp from 'child_process';
import os from 'os';

export async function run() {
if (os.platform() !== 'linux') {
core.setFailed(`Action not supported for: ${os.platform()} ${os.arch()}.`)
return;
}

try {
let dfxVersion = core.getInput('dfx-version');
core.info(`Setup dfx version ${dfxVersion}`);
Expand Down

0 comments on commit e867b6c

Please sign in to comment.