parent
947ed8e60f
commit
5783714f2b
3 changed files with 53 additions and 22 deletions
6
index.js
6
index.js
|
|
@ -1,6 +1,7 @@
|
||||||
const core = require("@actions/core");
|
const core = require("@actions/core");
|
||||||
const tc = require("@actions/tool-cache");
|
const tc = require("@actions/tool-cache");
|
||||||
const io = require("@actions/io");
|
const io = require("@actions/io");
|
||||||
|
const exec = require("@actions/exec");
|
||||||
const getLatestVersion = require("./get-latest-version");
|
const getLatestVersion = require("./get-latest-version");
|
||||||
|
|
||||||
// most @actions toolkit packages have async methods
|
// most @actions toolkit packages have async methods
|
||||||
|
|
@ -38,6 +39,11 @@ async function run() {
|
||||||
const hugoExtractedFolder = await tc.extractTar(hugoTarball, "/tmp");
|
const hugoExtractedFolder = await tc.extractTar(hugoTarball, "/tmp");
|
||||||
core.debug("hugoExtractedFolder:", hugoExtractedFolder);
|
core.debug("hugoExtractedFolder:", hugoExtractedFolder);
|
||||||
await io.mv(`${hugoExtractedFolder}/hugo`, hugoPath);
|
await io.mv(`${hugoExtractedFolder}/hugo`, hugoPath);
|
||||||
|
|
||||||
|
// Show version
|
||||||
|
await exec.exec('hugo version');
|
||||||
|
await exec.exec('go version');
|
||||||
|
await exec.exec('git --version');
|
||||||
},
|
},
|
||||||
function(error) {
|
function(error) {
|
||||||
core.setFailed(error);
|
core.setFailed(error);
|
||||||
|
|
|
||||||
66
node_modules/@actions/exec/package.json
generated
vendored
66
node_modules/@actions/exec/package.json
generated
vendored
|
|
@ -1,15 +1,39 @@
|
||||||
{
|
{
|
||||||
"name": "@actions/exec",
|
"_from": "@actions/exec",
|
||||||
"version": "1.0.1",
|
"_id": "@actions/exec@1.0.1",
|
||||||
"description": "Actions exec lib",
|
"_inBundle": false,
|
||||||
"keywords": [
|
"_integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==",
|
||||||
"github",
|
"_location": "/@actions/exec",
|
||||||
"actions",
|
"_phantomChildren": {},
|
||||||
"exec"
|
"_requested": {
|
||||||
|
"type": "tag",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@actions/exec",
|
||||||
|
"name": "@actions/exec",
|
||||||
|
"escapedName": "@actions%2fexec",
|
||||||
|
"scope": "@actions",
|
||||||
|
"rawSpec": "",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "latest"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"#USER",
|
||||||
|
"/",
|
||||||
|
"/@actions/tool-cache"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
|
"_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz",
|
||||||
"license": "MIT",
|
"_shasum": "1624b541165697e7008d7c87bc1f69f191263c6c",
|
||||||
"main": "lib/exec.js",
|
"_spec": "@actions/exec",
|
||||||
|
"_where": "/Users/iris/Documents/repos/github.com/peaceiris/actions-hugo",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Actions exec lib",
|
||||||
|
"devDependencies": {
|
||||||
|
"@actions/io": "^1.0.1"
|
||||||
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
|
|
@ -17,6 +41,16 @@
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
|
"gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52",
|
||||||
|
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
|
||||||
|
"keywords": [
|
||||||
|
"github",
|
||||||
|
"actions",
|
||||||
|
"exec"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "lib/exec.js",
|
||||||
|
"name": "@actions/exec",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
|
|
@ -28,15 +62,5 @@
|
||||||
"test": "echo \"Error: run tests from root\" && exit 1",
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||||
"tsc": "tsc"
|
"tsc": "tsc"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"version": "1.0.1"
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@actions/io": "^1.0.1"
|
|
||||||
},
|
|
||||||
"gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52"
|
|
||||||
|
|
||||||
,"_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz"
|
|
||||||
,"_integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ=="
|
|
||||||
,"_from": "@actions/exec@1.0.1"
|
|
||||||
}
|
}
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.1.0",
|
"@actions/core": "^1.1.0",
|
||||||
|
"@actions/exec": "^1.0.1",
|
||||||
"@actions/io": "^1.0.1",
|
"@actions/io": "^1.0.1",
|
||||||
"@actions/tool-cache": "^1.1.1",
|
"@actions/tool-cache": "^1.1.1",
|
||||||
"xmlhttprequest": "^1.8.0"
|
"xmlhttprequest": "^1.8.0"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue