mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 20:32:19 +01:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10f36c7c91 | ||
|
|
236e039b5f | ||
|
|
2f904a6aa6 | ||
|
|
2b3acb31e4 | ||
|
|
f14d276121 | ||
|
|
9eb8f9e108 | ||
|
|
69200f8579 | ||
|
|
3cf50c6d11 | ||
|
|
900499cd1c | ||
|
|
da7c321b3b |
16
.github/workflows/purge-readme-image-cache.yml
vendored
Normal file
16
.github/workflows/purge-readme-image-cache.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Purge image cache
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '4 18 * * */7'
|
||||
|
||||
jobs:
|
||||
purge:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
|
||||
- run: >
|
||||
curl -sL https://github.com/${GITHUB_REPOSITORY} |
|
||||
grep -oE '<img src="https?://camo.githubusercontent.com/[^"]+' |
|
||||
sed -e 's/<img src="//' |
|
||||
xargs -I % curl -sX PURGE %
|
||||
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@@ -16,12 +16,10 @@ jobs:
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Read .nvmrc
|
||||
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
|
||||
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
|
||||
id: nvm
|
||||
|
||||
- name: Setup Node
|
||||
@@ -67,9 +65,7 @@ jobs:
|
||||
extended: [true, false]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Test action
|
||||
uses: ./
|
||||
|
||||
6
.github/workflows/update-major-tag.yml
vendored
6
.github/workflows/update-major-tag.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Update major tag
|
||||
if: github.event.release.prerelease == false
|
||||
@@ -19,6 +19,6 @@ jobs:
|
||||
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
export TAG_NAME="${GITHUB_REF##refs/tags/}"
|
||||
export TAG_MAJOR="${TAG_NAME%%.*}"
|
||||
git tag "${TAG_MAJOR}" || git tag -d "${TAG_MAJOR}" ; git push origin ":refs/tags/${TAG_MAJOR}"
|
||||
git tag "${TAG_MAJOR}" || true
|
||||
git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || git tag -d "${TAG_MAJOR}" ; git push origin --delete "${TAG_MAJOR}"
|
||||
git tag "${TAG_MAJOR}" -m "Release ${TAG_NAME}" || true
|
||||
git push --tags origin
|
||||
|
||||
13
lib/index.js
13
lib/index.js
@@ -358,6 +358,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const os = __webpack_require__(87);
|
||||
const events = __webpack_require__(614);
|
||||
const child = __webpack_require__(129);
|
||||
const path = __webpack_require__(622);
|
||||
const io = __webpack_require__(1);
|
||||
const ioUtil = __webpack_require__(672);
|
||||
/* eslint-disable @typescript-eslint/unbound-method */
|
||||
const IS_WINDOWS = process.platform === 'win32';
|
||||
/*
|
||||
@@ -703,6 +706,16 @@ class ToolRunner extends events.EventEmitter {
|
||||
*/
|
||||
exec() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// root the tool path if it is unrooted and contains relative pathing
|
||||
if (!ioUtil.isRooted(this.toolPath) &&
|
||||
(this.toolPath.includes('/') ||
|
||||
(IS_WINDOWS && this.toolPath.includes('\\')))) {
|
||||
// prefer options.cwd if it is specified, however options.cwd may also need to be rooted
|
||||
this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
|
||||
}
|
||||
// if the tool is only a file name, then resolve it from the PATH
|
||||
// otherwise verify it exists (add extension on Windows if necessary)
|
||||
this.toolPath = yield io.which(this.toolPath, true);
|
||||
return new Promise((resolve, reject) => {
|
||||
this._debug(`exec tool: ${this.toolPath}`);
|
||||
this._debug('arguments:');
|
||||
|
||||
62
package-lock.json
generated
62
package-lock.json
generated
@@ -10,9 +10,12 @@
|
||||
"integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw=="
|
||||
},
|
||||
"@actions/exec": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz",
|
||||
"integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ=="
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.2.tgz",
|
||||
"integrity": "sha512-Yo/wfcFuxbVjAaAfvx3aGLhMEuonOahas2jf8BwyA52IkXTAmLi7YVZTpGAQG/lTxuGoNLg9slTWQD4rr7rMDQ==",
|
||||
"requires": {
|
||||
"@actions/io": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"@actions/io": {
|
||||
"version": "1.0.1",
|
||||
@@ -566,9 +569,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "12.12.14",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz",
|
||||
"integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==",
|
||||
"version": "12.12.17",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz",
|
||||
"integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/normalize-package-data": {
|
||||
@@ -599,32 +602,32 @@
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.10.0.tgz",
|
||||
"integrity": "sha512-FZhWq6hWWZBP76aZ7bkrfzTMP31CCefVIImrwP3giPLcoXocmLTmr92NLZxuIcTL4GTEOE33jQMWy9PwelL+yQ==",
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.11.0.tgz",
|
||||
"integrity": "sha512-YxcA/y0ZJaCc/fB/MClhcDxHI0nOBB7v2/WxBju2cOTanX7jO9ttQq6Fy4yW9UaY5bPd9xL3cun3lDVqk67sPQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.3",
|
||||
"@typescript-eslint/typescript-estree": "2.10.0",
|
||||
"@typescript-eslint/typescript-estree": "2.11.0",
|
||||
"eslint-scope": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.10.0.tgz",
|
||||
"integrity": "sha512-wQNiBokcP5ZsTuB+i4BlmVWq6o+oAhd8en2eSm/EE9m7BgZUIfEeYFd6z3S+T7bgNuloeiHA1/cevvbBDLr98g==",
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.11.0.tgz",
|
||||
"integrity": "sha512-DyGXeqhb3moMioEFZIHIp7oXBBh7dEfPTzGrlyP0Mi9ScCra4SWEGs3kPd18mG7Sy9Wy8z88zmrw5tSGL6r/6A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/eslint-visitor-keys": "^1.0.0",
|
||||
"@typescript-eslint/experimental-utils": "2.10.0",
|
||||
"@typescript-eslint/typescript-estree": "2.10.0",
|
||||
"@typescript-eslint/experimental-utils": "2.11.0",
|
||||
"@typescript-eslint/typescript-estree": "2.11.0",
|
||||
"eslint-visitor-keys": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.10.0.tgz",
|
||||
"integrity": "sha512-oOYnplddQNm/LGVkqbkAwx4TIBuuZ36cAQq9v3nFIU9FmhemHuVzAesMSXNQDdAzCa5bFgCrfD3JWhYVKlRN2g==",
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.11.0.tgz",
|
||||
"integrity": "sha512-HGY4+d4MagO6cKMcKfIKaTMxcAv7dEVnji2Zi+vi5VV8uWAM631KjAB5GxFcexMYrwKT0EekRiiGK1/Sd7VFGA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
@@ -2964,9 +2967,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"handlebars": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.3.1.tgz",
|
||||
"integrity": "sha512-c0HoNHzDiHpBt4Kqe99N8tdLPKAnGCQ73gYMPWtAYM4PwGnf7xl8PBUHJqh9ijlzt2uQKaSRxbXRt+rZ7M2/kA==",
|
||||
"version": "4.5.3",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz",
|
||||
"integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"neo-async": "^2.6.0",
|
||||
@@ -6457,14 +6460,23 @@
|
||||
"dev": true
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
|
||||
"integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.2.tgz",
|
||||
"integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"commander": "~2.20.0",
|
||||
"commander": "~2.20.3",
|
||||
"source-map": "~0.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"underscore": {
|
||||
|
||||
@@ -47,15 +47,15 @@
|
||||
"homepage": "https://github.com/peaceiris/actions-hugo#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.0",
|
||||
"@actions/exec": "^1.0.1",
|
||||
"@actions/exec": "^1.0.2",
|
||||
"@actions/io": "^1.0.1",
|
||||
"@actions/tool-cache": "^1.1.2",
|
||||
"xmlhttprequest": "^1.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^24.0.23",
|
||||
"@types/node": "^12.12.14",
|
||||
"@typescript-eslint/parser": "^2.10.0",
|
||||
"@types/node": "^12.12.17",
|
||||
"@typescript-eslint/parser": "^2.11.0",
|
||||
"@zeit/ncc": "^0.20.5",
|
||||
"eslint": "^6.7.2",
|
||||
"husky": "^3.1.0",
|
||||
|
||||
Reference in New Issue
Block a user