Compare commits

..

36 Commits

Author SHA1 Message Date
peaceiris
f6d0e78500 chore: add docker-compose.yml 2020-07-17 16:21:18 +09:00
Shohei Ueda
71327d4646 chore: disable deno on vscode (#388) 2020-07-17 16:08:23 +09:00
Shohei Ueda
1eeaa0edab ci: add workflow_dispatch 2020-07-17 15:50:48 +09:00
Shohei Ueda
da2d5466d3 chore: change default branch from master to main (#386) 2020-07-17 15:38:09 +09:00
dependabot[bot]
71f80aff9f deps: bump lodash from 4.17.15 to 4.17.19 (#385)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 11:39:04 +09:00
dependabot[bot]
3f02ff7a9e deps: bump @actions/tool-cache from 1.5.5 to 1.6.0 (#383)
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.5.5 to 1.6.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 11:21:01 +09:00
dependabot[bot]
87ff7f6586 deps: bump typescript from 3.9.6 to 3.9.7 (#384)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.6 to 3.9.7.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.6...v3.9.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 11:20:11 +09:00
peaceiris
18a17a77a8 docs: bump hugo from 0.71.1 to 0.74.1 2020-07-14 12:19:06 +09:00
dependabot[bot]
483f8d1e34 deps: bump standard-version from 8.0.1 to 8.0.2 (#382)
Bumps [standard-version](https://github.com/conventional-changelog/standard-version) from 8.0.1 to 8.0.2.
- [Release notes](https://github.com/conventional-changelog/standard-version/releases)
- [Changelog](https://github.com/conventional-changelog/standard-version/blob/master/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/standard-version/compare/v8.0.1...v8.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-14 11:18:19 +09:00
dependabot[bot]
c83f10804e deps: bump standard-version from 8.0.0 to 8.0.1 (#380)
Bumps [standard-version](https://github.com/conventional-changelog/standard-version) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/conventional-changelog/standard-version/releases)
- [Changelog](https://github.com/conventional-changelog/standard-version/blob/master/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/standard-version/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-13 15:05:14 +09:00
dependabot[bot]
cf40bc8ca5 deps: bump @types/node from 12.12.48 to 12.12.50 (#381)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.48 to 12.12.50.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-13 15:05:07 +09:00
Shohei Ueda
2fa902b35f ci: add codeql workflow 2020-07-07 16:46:50 +09:00
dependabot[bot]
16d8ce1cd5 deps: bump @types/jest from 26.0.3 to 26.0.4 (#378)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.3 to 26.0.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-07 14:26:38 +09:00
dependabot[bot]
1835230a2b deps: bump @types/node from 12.12.47 to 12.12.48 (#379)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.47 to 12.12.48.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-07 14:26:28 +09:00
dependabot[bot]
f1c7ecda61 deps: bump eslint-plugin-jest from 23.17.1 to 23.18.0 (#377)
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.17.1 to 23.18.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.17.1...v23.18.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-06 15:44:04 +09:00
Shohei Ueda
96f56dee02 deps: bump node from 12.18.1 to 12.18.2 (#376) 2020-07-02 22:38:14 +09:00
dependabot[bot]
863939f1a7 deps: bump typescript from 3.9.5 to 3.9.6 (#374)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.5 to 3.9.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 13:13:39 +09:00
dependabot[bot]
00ad5734ff ci: bump codecov/codecov-action from v1.0.7 to v1.0.10 (#373)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.7 to v1.0.10.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.7...f3570723ef743f6942b6a480461ed0cd6c0f9baa)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 13:13:01 +09:00
dependabot[bot]
eb88818df9 deps: bump nock from 13.0.1 to 13.0.2 (#375)
Bumps [nock](https://github.com/nock/nock) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.0.1...v13.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 13:11:23 +09:00
dependabot[bot]
45f920d29b deps: bump nock from 13.0.0 to 13.0.1 (#372)
Bumps [nock](https://github.com/nock/nock) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.0.0...v13.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-01 14:00:30 +09:00
dependabot[bot]
d59d21e633 ci: bump actions/setup-node from v2.0.0 to v2.1.0 (#371)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.0.0 to v2.1.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.0.0...1ae8f4b1fd89676f69b55d3dd6932b6df089ff7b)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-30 18:51:36 +09:00
dependabot[bot]
e4507caf0b deps: bump nock from 12.0.3 to 13.0.0 (#370)
Bumps [nock](https://github.com/nock/nock) from 12.0.3 to 13.0.0.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v12.0.3...v13.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-29 11:53:20 +09:00
dependabot[bot]
f42b9853d3 deps: bump @types/jest from 26.0.0 to 26.0.3 (#369)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.0 to 26.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-25 17:11:42 +09:00
dependabot[bot]
638096b27f deps: bump eslint-plugin-jest from 23.16.0 to 23.17.1 (#368)
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.16.0 to 23.17.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.16.0...v23.17.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-24 15:13:10 +09:00
Shohei Ueda
53a8986af5 ci: remove open-pull-requests-limit 2020-06-24 14:10:03 +09:00
dependabot[bot]
838268abaf deps: bump jest-circus from 26.0.1 to 26.1.0 (#367)
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 26.0.1 to 26.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v26.1.0/packages/jest-circus)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-24 14:08:58 +09:00
dependabot[bot]
9f4ef016d6 deps: bump eslint-plugin-jest from 23.13.2 to 23.16.0 (#366)
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.13.2 to 23.16.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.13.2...v23.16.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-22 14:29:08 +09:00
Shohei Ueda
8bff475612 chore: change printWidth from 80 to 100 (#365) 2020-06-22 05:40:06 +09:00
dependabot[bot]
be3787356a ci: bump peaceiris/actions-label-commenter from v1 to v1.3.7 (#364)
Bumps [peaceiris/actions-label-commenter](https://github.com/peaceiris/actions-label-commenter) from v1 to v1.3.7.
- [Release notes](https://github.com/peaceiris/actions-label-commenter/releases)
- [Changelog](https://github.com/peaceiris/actions-label-commenter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-label-commenter/compare/v1...56d53284bcd1157938a58751728e275ebf9d3ec7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-22 03:34:59 +09:00
Shohei Ueda
919a5f9b0b chore: fix link to GitHub Actions Community Forum 2020-06-22 03:32:45 +09:00
peaceiris
20fdc5a174 chore(release): Remove build assets [skip ci] 2020-06-21 13:19:00 +09:00
peaceiris
6fca5e4b8e chore(release): 2.4.12 2020-06-21 13:19:00 +09:00
peaceiris
0ea1e4ebec chore(release): Add build assets 2020-06-21 13:18:58 +09:00
yutopp
54af4c1320 fix: Wrap an entrypoint by async to handle exceptions correctly (#363)
* fix: add return type

Co-authored-by: Shohei Ueda <30958501+peaceiris@users.noreply.github.com>
2020-06-21 13:16:10 +09:00
Shohei Ueda
998d85162e ci: remove skipci job 2020-06-21 13:04:33 +09:00
Shohei Ueda
c0e9f57fdb ci: add is_skip [skip ci] 2020-06-19 20:46:22 +09:00
30 changed files with 965 additions and 744 deletions

View File

@@ -1,34 +0,0 @@
{
"name": "Node",
"build": {
"dockerfile": "../Dockerfile",
"context": "..",
"args": {
"NODE_VERSION": "12.18.1"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"editorconfig.editorconfig"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "npm ci",
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode",
// Developing inside a container on a remote Docker host
// https://code.visualstudio.com/docs/remote/containers-advanced#_developing-inside-a-container-on-a-remote-docker-host
"workspaceFolder": "/workspace",
"workspaceMount": "source=/home/iris/Documents/repos/github.com/peaceiris/actions-hugo,target=/workspace,type=volume"
}

View File

@@ -6,7 +6,6 @@ updates:
interval: daily
time: '11:00'
timezone: Japan
open-pull-requests-limit: 1
labels:
- "dependencies"
ignore:

View File

@@ -9,7 +9,7 @@ labels:
issue:
body: |
Please ask questions about GitHub Actions or Hugo at the following forum.
- [GitHub Actions Community Forum](https://github.community/t5/GitHub-Actions/bd-p/actions)
- [GitHub Actions Community Forum](https://github.community/c/github-actions)
- [Hugo Community Forum](https://discourse.gohugo.io/)
action: close
- name: wontfix

29
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: "Code Scanning"
on:
push:
branches:
- main
pull_request:
jobs:
CodeQL-Build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -3,7 +3,7 @@ name: 'Dev Image CI'
on:
push:
branches:
- master
- main
paths:
- '.github/workflows/dev-image.yml'
- '.dockerignore'

View File

@@ -16,10 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: master
ref: main
- name: Label Commenter
uses: peaceiris/actions-label-commenter@v1
uses: peaceiris/actions-label-commenter@v1.3.7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# config_file: .github/label-commenter-config.yml

View File

@@ -3,6 +3,7 @@ name: Daily Test
on:
schedule:
- cron: '13 13 * * *'
workflow_dispatch:
jobs:
test:

View File

@@ -3,7 +3,7 @@ name: 'Test'
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:
@@ -11,14 +11,8 @@ on:
- '**.md'
jobs:
skipci:
runs-on: ubuntu-18.04
steps:
- run: echo "[skip ci] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
test:
runs-on: ${{ matrix.os }}
if: contains(github.event.head_commit.message, '[skip ci]') == false
strategy:
matrix:
os:
@@ -35,7 +29,7 @@ jobs:
id: nvm
- name: Setup Node
uses: actions/setup-node@v2.0.0
uses: actions/setup-node@v2.1.0
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
@@ -62,6 +56,6 @@ jobs:
name: coverage-${{ matrix.os }}
path: coverage
- uses: codecov/codecov-action@v1.0.7
- uses: codecov/codecov-action@v1.0.10
with:
token: ${{ secrets.CODECOV_TOKEN }}

1
.gitignore vendored
View File

@@ -4,4 +4,3 @@ coverage
.eslintcache
.env
node_modules
.vscode/settings.json

2
.nvmrc
View File

@@ -1 +1 @@
12.18.1
12.18.2

View File

@@ -1,5 +1,5 @@
{
"printWidth": 80,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": true,

View File

@@ -1,19 +0,0 @@
{
"recommendations": [
"ms-vscode-remote.vscode-remote-extensionpack",
"ms-azuretools.vscode-docker",
"bungcip.better-toml",
"editorconfig.editorconfig",
"lfs.vscode-emacs-friendly",
"donjayamanne.githistory",
"github.vscode-pull-request-github",
"eamodio.gitlens",
"oderwat.indent-rainbow",
"yzhang.markdown-all-in-one",
"shd101wyy.markdown-preview-enhanced",
"christian-kohler.path-intellisense",
"satokaz.vscode-bs-ctrlchar-remover",
"visualstudioexptteam.vscodeintellicode",
"esbenp.prettier-vscode"
]
}

15
.vscode/launch.json vendored
View File

@@ -1,15 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.1.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Node (Integrated Terminal)",
"program": "${workspaceFolder}/src/index.ts",
"console": "integratedTerminal"
}
]
}

4
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"git.ignoreLimitWarning": true,
"deno.enable": false
}

View File

@@ -2,6 +2,116 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.4.12](https://github.com/peaceiris/actions-hugo/compare/v2.4.11...v2.4.12) (2020-06-21)
### chore
* Add CODEOWNERS ([75e0d6c](https://github.com/peaceiris/actions-hugo/commit/75e0d6c01d147a40a4ca4d546a35f0aa89977cd8))
* Enhance style ([07082d9](https://github.com/peaceiris/actions-hugo/commit/07082d9e3b019317c88ab12ee38807e476f9ae5c))
* Please follow the issue templates ([16b12f7](https://github.com/peaceiris/actions-hugo/commit/16b12f7dfe70a4b9d8a867616374a2b70b6cbd7d))
* Ported issue template ([2aa39a0](https://github.com/peaceiris/actions-hugo/commit/2aa39a0fb5fd48fb28b7fd4c1e41980674d291f4))
### ci
* Add hook for doctoc ([2357c76](https://github.com/peaceiris/actions-hugo/commit/2357c76e2abc2649fcab48eb899a8b2a617d371a))
* add is_skip [skip ci] ([c0e9f57](https://github.com/peaceiris/actions-hugo/commit/c0e9f57fdbd5049eb5e8d479c10b7d85bccaf21f))
* Add Label Commenter Action ([271b8c5](https://github.com/peaceiris/actions-hugo/commit/271b8c5d4e39f7019428366d9194fb75beb26a23))
* add package-ecosystem github-actions ([38bf1d2](https://github.com/peaceiris/actions-hugo/commit/38bf1d20d08732c5b05fafc7093258d87ae8733a))
* Add ubuntu-16.04 ([55117bd](https://github.com/peaceiris/actions-hugo/commit/55117bdfe7031543062c1a69e3f4ccf28bec9448))
* Add ubuntu-20.04 (#355) ([926e28d](https://github.com/peaceiris/actions-hugo/commit/926e28de4aa8dca25a718a1eb8c593a771b2c3b3)), closes [#355](https://github.com/peaceiris/actions-hugo/issues/355)
* bump actions/setup-node from v1 to v2.0.0 (#359) ([41aa07a](https://github.com/peaceiris/actions-hugo/commit/41aa07a09a8f741e87bea9a2d763300f19702547)), closes [#359](https://github.com/peaceiris/actions-hugo/issues/359)
* bump codecov/codecov-action from v1 to v1.0.7 (#358) ([0b3975d](https://github.com/peaceiris/actions-hugo/commit/0b3975d69013fa58ebe97813b1de53260d654712)), closes [#358](https://github.com/peaceiris/actions-hugo/issues/358)
* Change update_type from all to semver:minor ([e4c9fb3](https://github.com/peaceiris/actions-hugo/commit/e4c9fb3020e200921210b2792ef39c5b70f335c6))
* Enhance test workflow (#301) ([0b128ac](https://github.com/peaceiris/actions-hugo/commit/0b128ac232579caa1e5817628f96aee1759a3627)), closes [#301](https://github.com/peaceiris/actions-hugo/issues/301)
* fix labels of github-actions ([697e1b0](https://github.com/peaceiris/actions-hugo/commit/697e1b0bf943bedbb08f978b353956d591f38dc0))
* remove pull_request.types ([312bc2c](https://github.com/peaceiris/actions-hugo/commit/312bc2c8e4e0c8f0e297fabe335bd322edbb5a3b))
* remove skipci job ([998d851](https://github.com/peaceiris/actions-hugo/commit/998d85162e3e9752aabdf6e7a2dd2dcdd946881e))
* Update Dependabot config file (#345) ([f0d9378](https://github.com/peaceiris/actions-hugo/commit/f0d93788f5871d7f4cfa35da5c12cada1b9de16e)), closes [#345](https://github.com/peaceiris/actions-hugo/issues/345)
### deps
* bump @actions/core from 1.2.3 to 1.2.4 ([aaaac3a](https://github.com/peaceiris/actions-hugo/commit/aaaac3ae9967a1f3277ceb6aab52070034ec3565))
* bump @actions/exec from 1.0.3 to 1.0.4 ([a098653](https://github.com/peaceiris/actions-hugo/commit/a098653b2f3a9ed5e9bb14ccbf32dfe70c3f4dd3))
* bump @actions/tool-cache from 1.3.4 to 1.3.5 ([9ba5218](https://github.com/peaceiris/actions-hugo/commit/9ba52187b56e1070eee5b8d28b899ed7317405f6))
* bump @actions/tool-cache from 1.3.5 to 1.5.5 (#333) ([3c2f87a](https://github.com/peaceiris/actions-hugo/commit/3c2f87a0bff49d8aed403dd586b84f128f9ba4fd)), closes [#333](https://github.com/peaceiris/actions-hugo/issues/333)
* bump @types/jest from 25.2.1 to 25.2.2 ([4c11e4e](https://github.com/peaceiris/actions-hugo/commit/4c11e4e48a81e55ee0841a8018f16ec59f27ca20))
* bump @types/jest from 25.2.2 to 25.2.3 ([b1d5e3f](https://github.com/peaceiris/actions-hugo/commit/b1d5e3fb147bfbb9c89327b64067e4cde1b2ac84))
* bump @types/jest from 25.2.3 to 26.0.0 (#352) ([b18493f](https://github.com/peaceiris/actions-hugo/commit/b18493fdf7d73b960b320e49e1d5b83991e87c88)), closes [#352](https://github.com/peaceiris/actions-hugo/issues/352)
* bump @types/node from 12.12.37 to 12.12.38 ([dc79cf9](https://github.com/peaceiris/actions-hugo/commit/dc79cf98c43e9310a1ab08bb501529d7ed6aaedc))
* bump @types/node from 12.12.38 to 12.12.41 ([89fc843](https://github.com/peaceiris/actions-hugo/commit/89fc843efbe601d77b00552cd75ef7a262f9560a))
* bump @types/node from 12.12.41 to 12.12.42 ([ad8ddd7](https://github.com/peaceiris/actions-hugo/commit/ad8ddd743ab4b5e555f93f960e2f9913624102ac))
* bump @types/node from 12.12.42 to 12.12.43 ([07ef174](https://github.com/peaceiris/actions-hugo/commit/07ef174ec463583d48557606ba0546543ff7a677))
* bump @types/node from 12.12.43 to 12.12.44 (#347) ([e92a791](https://github.com/peaceiris/actions-hugo/commit/e92a791bf30d2c682faf364d4d8658f944384d46)), closes [#347](https://github.com/peaceiris/actions-hugo/issues/347)
* bump @types/node from 12.12.44 to 12.12.45 (#350) ([b5e2760](https://github.com/peaceiris/actions-hugo/commit/b5e2760b23b75985a5963549ef967ad204e0b44a)), closes [#350](https://github.com/peaceiris/actions-hugo/issues/350)
* bump @types/node from 12.12.45 to 12.12.47 (#351) ([2f831ed](https://github.com/peaceiris/actions-hugo/commit/2f831edb58c1372ecf7707dd046cabece5687106)), closes [#351](https://github.com/peaceiris/actions-hugo/issues/351)
* bump @typescript-eslint/eslint-plugin from 2.28.0 to 2.30.0 ([3e0138d](https://github.com/peaceiris/actions-hugo/commit/3e0138dbef3407a112e64881f1550c88456109e9))
* bump @typescript-eslint/eslint-plugin from 2.30.0 to 2.31.0 ([b92f084](https://github.com/peaceiris/actions-hugo/commit/b92f084f4595967244dc347624cfab55415b0bc1))
* bump @typescript-eslint/eslint-plugin from 2.31.0 to 2.32.0 ([9216be3](https://github.com/peaceiris/actions-hugo/commit/9216be3bc0ef12b561702f0a148c20b79f6834d2))
* bump @typescript-eslint/eslint-plugin from 2.32.0 to 2.33.0 ([66a332b](https://github.com/peaceiris/actions-hugo/commit/66a332b429091e28faebc300216f305e81c339f7))
* bump @typescript-eslint/eslint-plugin from 2.33.0 to 2.34.0 ([7e64f45](https://github.com/peaceiris/actions-hugo/commit/7e64f450a732b1336e2b46870c89d989cbf52d47))
* bump @typescript-eslint/parser from 2.30.0 to 2.31.0 ([b99a08a](https://github.com/peaceiris/actions-hugo/commit/b99a08a3b8e7dc0711f18e3c8180d1c8c873eb1b))
* bump @typescript-eslint/parser from 2.31.0 to 2.32.0 ([8c661f7](https://github.com/peaceiris/actions-hugo/commit/8c661f7d9b7ab8cf940148fde66a58a6befa6391))
* bump @typescript-eslint/parser from 2.32.0 to 2.33.0 ([012b11d](https://github.com/peaceiris/actions-hugo/commit/012b11dba4f2e38755c5acdfba1c4711f009c3ae))
* bump @typescript-eslint/parser from 2.33.0 to 2.34.0 ([271cee0](https://github.com/peaceiris/actions-hugo/commit/271cee08e77e64479d7282a1f7bba2733c1a5502))
* bump @zeit/ncc from 0.22.1 to 0.22.2 (#329) ([98135d2](https://github.com/peaceiris/actions-hugo/commit/98135d2cd0f2f4597c404384cafa03215fd01378)), closes [#329](https://github.com/peaceiris/actions-hugo/issues/329)
* bump @zeit/ncc from 0.22.2 to 0.22.3 (#339) ([8f166cf](https://github.com/peaceiris/actions-hugo/commit/8f166cf07e4691d65b912ad2fef51aa3e5ff57fe)), closes [#339](https://github.com/peaceiris/actions-hugo/issues/339)
* bump eslint-plugin-jest from 23.10.0 to 23.11.0 ([c264525](https://github.com/peaceiris/actions-hugo/commit/c264525a0ab2387ea6309d92576e7462c903a1f5))
* bump eslint-plugin-jest from 23.11.0 to 23.12.0 ([e6a0191](https://github.com/peaceiris/actions-hugo/commit/e6a01917e07ede5857ebc5e686249e8d3ff9a491))
* bump eslint-plugin-jest from 23.12.0 to 23.13.0 ([dd37fe2](https://github.com/peaceiris/actions-hugo/commit/dd37fe20fa14d9a38229a3d004c1db29de6a6e74))
* bump eslint-plugin-jest from 23.13.0 to 23.13.1 ([7d80e16](https://github.com/peaceiris/actions-hugo/commit/7d80e1641cfd813ce9387b4b9961a4e7845f31ec))
* bump eslint-plugin-jest from 23.13.1 to 23.13.2 ([b458469](https://github.com/peaceiris/actions-hugo/commit/b458469ce7b3a8dd28e7c9cd4428bbf293202e18))
* bump eslint-plugin-jest from 23.8.2 to 23.9.0 ([11b6ba4](https://github.com/peaceiris/actions-hugo/commit/11b6ba478ca58a02938a6d650d6d0a7a0637054e))
* bump eslint-plugin-jest from 23.9.0 to 23.10.0 ([ef0b1e0](https://github.com/peaceiris/actions-hugo/commit/ef0b1e0a8500c34dff72bb6e730a5d2d62db362f))
* bump git from 2.26.1 to 2.27.0 (#354) ([5420562](https://github.com/peaceiris/actions-hugo/commit/54205620eee116a6c8b2b43047be61fec3713f75)), closes [#354](https://github.com/peaceiris/actions-hugo/issues/354)
* bump jest from 25.5.0 to 25.5.1 ([b9fb59f](https://github.com/peaceiris/actions-hugo/commit/b9fb59f829d2305d75c8d6f4acafa19d0f3c9376))
* bump jest from 25.5.1 to 25.5.2 ([b9569c2](https://github.com/peaceiris/actions-hugo/commit/b9569c27b6b33a0677dbb14f753b4494b7aa3ff1))
* bump jest from 25.5.2 to 25.5.3 ([815ceae](https://github.com/peaceiris/actions-hugo/commit/815ceae6cf2313a1c633cfc24648f08015101d49))
* bump jest from 25.5.3 to 25.5.4 ([b0c6103](https://github.com/peaceiris/actions-hugo/commit/b0c61036db0b2f5747405b1c2e29c262d3af6364))
* bump jest-circus from 25.5.0 to 25.5.1 ([a3c3e71](https://github.com/peaceiris/actions-hugo/commit/a3c3e71549f8f2b4d19e2a9c1908bc094d3c7964))
* bump jest-circus from 25.5.1 to 25.5.2 ([ed2a699](https://github.com/peaceiris/actions-hugo/commit/ed2a6998667974d53da9eb518d497f1842362413))
* bump jest-circus from 25.5.2 to 25.5.3 ([02e6a28](https://github.com/peaceiris/actions-hugo/commit/02e6a28e7e7ecfd74ba1de73a0e69cd9d32aa856))
* bump jest-circus from 25.5.3 to 25.5.4 ([9983819](https://github.com/peaceiris/actions-hugo/commit/9983819c7b12bf0b2199eefb45264ef96b2b86ec))
* bump jest-circus from 25.5.4 to 26.0.0 ([fc3f6e7](https://github.com/peaceiris/actions-hugo/commit/fc3f6e7cc9e9bbd4a31ba5644b44a40c4e092882))
* bump jest-circus from 26.0.0 to 26.0.1 ([4271d65](https://github.com/peaceiris/actions-hugo/commit/4271d65cbac605d9b9143a59ed77436a90328439))
* bump lint-staged from 10.1.6 to 10.2.0 ([5dbfe6b](https://github.com/peaceiris/actions-hugo/commit/5dbfe6b02fa7ea6c544a91b8c733f370eb781fe1))
* bump lint-staged from 10.2.0 to 10.2.1 ([97168f4](https://github.com/peaceiris/actions-hugo/commit/97168f4ffdc9120321ab81f3785ed883a0292da2))
* bump lint-staged from 10.2.1 to 10.2.2 ([466efd6](https://github.com/peaceiris/actions-hugo/commit/466efd6e327be8268c8e4f58b8dde51b571696b0))
* bump lint-staged from 10.2.10 to 10.2.11 (#357) ([4ec522d](https://github.com/peaceiris/actions-hugo/commit/4ec522dca345774f865ef33f624c622763dedbb8)), closes [#357](https://github.com/peaceiris/actions-hugo/issues/357)
* bump lint-staged from 10.2.2 to 10.2.4 ([2cdb0da](https://github.com/peaceiris/actions-hugo/commit/2cdb0da4debc0c98061b4e09c6547ddd2db1834c))
* bump lint-staged from 10.2.4 to 10.2.6 ([b920e24](https://github.com/peaceiris/actions-hugo/commit/b920e249f6a1acb1fbff7ff6e8711916869a27c3))
* bump lint-staged from 10.2.6 to 10.2.7 ([592603c](https://github.com/peaceiris/actions-hugo/commit/592603c7c2a30e3a450363117c41a7ec358f2d06))
* bump lint-staged from 10.2.7 to 10.2.8 (#346) ([533dde8](https://github.com/peaceiris/actions-hugo/commit/533dde857531b95164d8d5f21462187e581618a9)), closes [#346](https://github.com/peaceiris/actions-hugo/issues/346)
* bump lint-staged from 10.2.8 to 10.2.9 (#349) ([dcf08e2](https://github.com/peaceiris/actions-hugo/commit/dcf08e2fd2c712501ecb05cbc2005a1e4de06092)), closes [#349](https://github.com/peaceiris/actions-hugo/issues/349)
* bump lint-staged from 10.2.9 to 10.2.10 (#356) ([914abda](https://github.com/peaceiris/actions-hugo/commit/914abda3d8422bc3d850bb3651f7540dd714036a)), closes [#356](https://github.com/peaceiris/actions-hugo/issues/356)
* bump node from 12.16.1 to 12.16.3 (#288) ([32e3df2](https://github.com/peaceiris/actions-hugo/commit/32e3df2806a568e829146259abc0965797b6cf59)), closes [#288](https://github.com/peaceiris/actions-hugo/issues/288)
* bump node from 12.16.3 to 12.18.0 (#353) ([09cf940](https://github.com/peaceiris/actions-hugo/commit/09cf94008e15f8629028e708ebf5049286556670)), closes [#353](https://github.com/peaceiris/actions-hugo/issues/353)
* bump node from 12.18.0 to 12.18.1 (#360) ([7160613](https://github.com/peaceiris/actions-hugo/commit/71606133495c4ec46bff6f3096e9f98e62a24e05)), closes [#360](https://github.com/peaceiris/actions-hugo/issues/360)
* bump standard-version from 7.1.0 to 8.0.0 ([73356f0](https://github.com/peaceiris/actions-hugo/commit/73356f0ae57cb8fb165a929f8e9637120334b86a))
* bump ts-jest from 25.4.0 to 25.5.0 ([0c93074](https://github.com/peaceiris/actions-hugo/commit/0c93074aabfd1477a93af132e2e6ca8b397919d9))
* bump ts-jest from 25.5.0 to 25.5.1 ([d7c46d0](https://github.com/peaceiris/actions-hugo/commit/d7c46d09c935763ad519d2f34290f4ac6be38ccb))
* bump typescript from 3.8.3 to 3.9.2 ([b555054](https://github.com/peaceiris/actions-hugo/commit/b55505415753f290f1e3e93b92826257bd21aaee))
* bump typescript from 3.9.2 to 3.9.3 ([d3ebe5d](https://github.com/peaceiris/actions-hugo/commit/d3ebe5d657f863b5879b6fb2df7e6ba6bb2e983f))
* bump typescript from 3.9.3 to 3.9.5 (#348) ([658d24b](https://github.com/peaceiris/actions-hugo/commit/658d24bb3e335ec5695aa87bc6b2c02cd78f0028)), closes [#348](https://github.com/peaceiris/actions-hugo/issues/348)
### docs
* add Babel ([b99235e](https://github.com/peaceiris/actions-hugo/commit/b99235e60ed6e4cbf138aa9167f567a4a6c664e6))
* Add new section for asciidoctor ([71fe6db](https://github.com/peaceiris/actions-hugo/commit/71fe6dbc7f2bd0596392fe20805753a67b00af1f)), closes [#342](https://github.com/peaceiris/actions-hugo/issues/342)
* Add new section for google/docsy ([e3045c5](https://github.com/peaceiris/actions-hugo/commit/e3045c5fb50cfbacbc0d9b9ce287d7e112f56e00))
* bump hugo from 0.68.3 to 0.71.0 ([cb3ccf6](https://github.com/peaceiris/actions-hugo/commit/cb3ccf6f428dc8320595af305c6531679b343eb1))
* bump hugo to 0.71.1 ([cb1a02b](https://github.com/peaceiris/actions-hugo/commit/cb1a02bb3535bef17b19b5811658d61b60377bcc))
* bump hugo to 0.71.1 ([ad41861](https://github.com/peaceiris/actions-hugo/commit/ad41861beb535cc414f8a2ff238b28aa334db49a))
* remove Dependabot status badge ([aa5de43](https://github.com/peaceiris/actions-hugo/commit/aa5de43b2b75066241428b66dcf9204351ab680b))
* update ToC ([dd33407](https://github.com/peaceiris/actions-hugo/commit/dd334074ce1f4f6c0e3599c0c913426bac4575fe))
* update url ([0f35b33](https://github.com/peaceiris/actions-hugo/commit/0f35b33b7371b0c4b115eeb0ea6acdb9cd2e0e78))
### fix
* Wrap an entrypoint by async to handle exceptions correctly (#363) ([54af4c1](https://github.com/peaceiris/actions-hugo/commit/54af4c1320eee4b2c9c6d46b4bede3f593b1bc50)), closes [#363](https://github.com/peaceiris/actions-hugo/issues/363)
## [2.4.11](https://github.com/peaceiris/actions-hugo/compare/v2.4.10...v2.4.11) (2020-04-29)

View File

@@ -23,7 +23,7 @@ RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
make all && \
make install
WORKDIR /workspace
WORKDIR /repo
ENV RUNNER_TEMP="/tmp"
CMD [ "bash" ]

View File

@@ -2,14 +2,13 @@ cmd := "bash"
msg := ""
IMAGE_NAME := actions_hugo_dev:latest
NODE_VERSION := $(shell cat ./.nvmrc)
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME)
.PHONY: build
build:
$(DOCKER_BUILD)
docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
.PHONY: run
run:

View File

@@ -1,11 +1,11 @@
[![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
[![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/main/LICENSE)
[![release](https://img.shields.io/github/release/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases/latest)
[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases)
[![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-hugo/releases.atom)
![Test](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg?branch=master&event=push)
![Test](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg?branch=main&event=push)
[![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-hugo/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
[![codecov](https://codecov.io/gh/peaceiris/actions-hugo/branch/master/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-hugo)
[![codecov](https://codecov.io/gh/peaceiris/actions-hugo/branch/main/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-hugo)
[![Maintainability](https://api.codeclimate.com/v1/badges/ebf2eef3a046b396ba9c/maintainability)](https://codeclimate.com/github/peaceiris/actions-hugo/maintainability)
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
@@ -75,7 +75,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -89,7 +89,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.71.1'
hugo-version: '0.74.1'
# extended: true
- name: Build
@@ -118,7 +118,7 @@ Set `extended: true` to use a Hugo extended version.
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.71.1'
hugo-version: '0.74.1'
extended: true
```
@@ -150,7 +150,7 @@ How to sync a Hugo version between a Docker Compose and a GitHub Actions workflo
Write a `HUGO_VERSION` to the `.env` file like the following and push it to a remote branch.
```sh
HUGO_VERSION=0.71.1
HUGO_VERSION=0.74.1
```
Next, add a step to read a Hugo version from the `.env` file.
@@ -210,7 +210,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -224,7 +224,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.71.1'
hugo-version: '0.74.1'
extended: true
- name: Setup Node
@@ -259,7 +259,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -273,7 +273,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.71.1'
hugo-version: '0.74.1'
extended: true
- name: Setup Ruby
@@ -310,7 +310,7 @@ jobs:
- [MIT License - peaceiris/actions-hugo]
[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/master/LICENSE
[MIT License - peaceiris/actions-hugo]: https://github.com/peaceiris/actions-hugo/blob/main/LICENSE

View File

@@ -27,15 +27,9 @@ describe('getURL()', () => {
describe('getLatestVersion()', () => {
test('return latest version via brew', async () => {
nock('https://formulae.brew.sh')
.get(`/api/formula/${Tool.Repo}.json`)
.reply(200, jsonTestBrew);
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(200, jsonTestBrew);
const versionLatest: string = await getLatestVersion(
Tool.Org,
Tool.Repo,
'brew'
);
const versionLatest: string = await getLatestVersion(Tool.Org, Tool.Repo, 'brew');
expect(versionLatest).toMatch(Tool.TestVersionLatest);
});
@@ -44,21 +38,13 @@ describe('getLatestVersion()', () => {
.get(`/repos/${Tool.Org}/${Tool.Repo}/releases/latest`)
.reply(200, jsonTestGithub);
const versionLatest: string = await getLatestVersion(
Tool.Org,
Tool.Repo,
'github'
);
const versionLatest: string = await getLatestVersion(Tool.Org, Tool.Repo, 'github');
expect(versionLatest).toMatch(Tool.TestVersionLatest);
});
test('return exception 404', async () => {
nock('https://formulae.brew.sh')
.get(`/api/formula/${Tool.Repo}.json`)
.reply(404);
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(404);
await expect(
getLatestVersion(Tool.Org, Tool.Repo, 'brew')
).rejects.toThrowError(FetchError);
await expect(getLatestVersion(Tool.Org, Tool.Repo, 'brew')).rejects.toThrowError(FetchError);
});
});

View File

@@ -2,8 +2,7 @@ import getURL from '../src/get-url';
describe('getURL()', () => {
test('test', () => {
const baseURL =
'https://github.com/gohugoio/hugo/releases/download/v0.58.2';
const baseURL = 'https://github.com/gohugoio/hugo/releases/download/v0.58.2';
const urlLinux = `${baseURL}/hugo_0.58.2_Linux-64bit.tar.gz`;
const urlLinuxExtended = `${baseURL}/hugo_extended_0.58.2_Linux-64bit.tar.gz`;
const urlMacOS = `${baseURL}/hugo_0.58.2_macOS-64bit.tar.gz`;

View File

@@ -43,36 +43,26 @@ describe('Integration testing run()', () => {
test('succeed in installing the latest version', async () => {
const testVersion = 'latest';
process.env['INPUT_HUGO-VERSION'] = testVersion;
nock('https://formulae.brew.sh')
.get(`/api/formula/${Tool.Repo}.json`)
.reply(200, jsonTestBrew);
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(200, jsonTestBrew);
const result: main.ActionResult = await main.run();
expect(result.exitcode).toBe(0);
expect(result.output).toMatch(
`Hugo Static Site Generator v${Tool.TestVersionLatest}`
);
expect(result.output).toMatch(`Hugo Static Site Generator v${Tool.TestVersionLatest}`);
});
test('succeed in installing the latest extended version', async () => {
const testVersion = 'latest';
process.env['INPUT_HUGO-VERSION'] = testVersion;
process.env['INPUT_EXTENDED'] = 'true';
nock('https://formulae.brew.sh')
.get(`/api/formula/${Tool.Repo}.json`)
.reply(200, jsonTestBrew);
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(200, jsonTestBrew);
const result: main.ActionResult = await main.run();
expect(result.exitcode).toBe(0);
expect(result.output).toMatch(
`Hugo Static Site Generator v${Tool.TestVersionLatest}`
);
expect(result.output).toMatch(`Hugo Static Site Generator v${Tool.TestVersionLatest}`);
expect(result.output).toMatch(`extended`);
});
test('fail to install the latest version due to 404 of brew', async () => {
process.env['INPUT_HUGO-VERSION'] = 'latest';
nock('https://formulae.brew.sh')
.get(`/api/formula/${Tool.Repo}.json`)
.reply(404);
nock('https://formulae.brew.sh').get(`/api/formula/${Tool.Repo}.json`).reply(404);
await expect(main.run()).rejects.toThrowError(FetchError);
});
@@ -91,8 +81,6 @@ describe('showVersion()', () => {
});
test('return not found', async () => {
await expect(
main.showVersion('gitgit', ['--version'])
).rejects.toThrowError(Error);
await expect(main.showVersion('gitgit', ['--version'])).rejects.toThrowError(Error);
});
});

16
docker-compose.yml Normal file
View File

@@ -0,0 +1,16 @@
version: '3.2'
services:
dev:
image: 'docker.pkg.github.com/peaceiris/actions-hugo/dev:latest'
build:
context: .
# cache_from:
# - 'docker.pkg.github.com/peaceiris/actions-hugo/dev:latest'
container_name: peaceiris_actions_hugo_dev_latest
volumes:
- ${PWD}:/repo
stdin_open: true
tty: true
command:
- bash

1288
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "actions-hugo",
"version": "2.4.11",
"version": "2.4.12",
"description": "GitHub Actions for Hugo",
"main": "lib/index.js",
"engines": {
@@ -27,7 +27,7 @@
}
},
"lint-staged": {
"src/**/*.ts": [
"{src,__tests__}/**/*.ts": [
"prettier --check",
"eslint"
],
@@ -57,26 +57,26 @@
"@actions/core": "^1.2.4",
"@actions/exec": "^1.0.4",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.5.5",
"@actions/tool-cache": "^1.6.0",
"node-fetch": "^2.6.0"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"@types/jest": "^26.0.4",
"@types/node": "~12",
"@types/node-fetch": "^2.5.7",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"@zeit/ncc": "^0.22.3",
"eslint": "^6.8.0",
"eslint-plugin-jest": "^23.13.2",
"eslint-plugin-jest": "^23.18.0",
"husky": "^4.2.5",
"jest": "^25.5.4",
"jest-circus": "^26.0.1",
"jest-circus": "^26.1.0",
"lint-staged": "^10.2.11",
"nock": "^12.0.3",
"nock": "^13.0.2",
"prettier": "2.0.5",
"standard-version": "^8.0.0",
"standard-version": "^8.0.2",
"ts-jest": "^25.5.1",
"typescript": "^3.9.5"
"typescript": "^3.9.7"
}
}

View File

@@ -3,8 +3,10 @@
# fail on unset variables and command errors
set -eu -o pipefail # -x: is for debugging
if [ "$(git branch --show-current)" != "master" ]; then
echo "$0: Current branch is not master" 1>&2
DEFAULT_BRANCH="main"
if [ "$(git branch --show-current)" != "${DEFAULT_BRANCH}" ]; then
echo "$0: Current branch is not ${DEFAULT_BRANCH}" 1>&2
exit 1
fi
@@ -26,7 +28,7 @@ if [ "${res}" = "n" ]; then
fi
git fetch origin
git pull origin master
git pull origin "${DEFAULT_BRANCH}"
git tag -d v2 || true
git pull origin --tags
@@ -44,5 +46,5 @@ rm -rf ./lib
git commit -m "chore(release): Remove build assets [skip ci]"
TAG_NAME="v$(jq -r '.version' ./package.json)"
git push origin master
git push origin "${DEFAULT_BRANCH}"
git push origin "${TAG_NAME}"

View File

@@ -12,11 +12,7 @@ export function getURL(org: string, repo: string, api: string): string {
return url;
}
export async function getLatestVersion(
org: string,
repo: string,
api: string
): Promise<string> {
export async function getLatestVersion(org: string, repo: string, api: string): Promise<string> {
const url = getURL(org, repo, api);
const response = await fetch(url);
const json = await response.json();

View File

@@ -1,8 +1,4 @@
export default function getURL(
os: string,
extended: string,
version: string
): string {
export default function getURL(os: string, extended: string, version: string): string {
const extendedStr = (extended: string): string => {
if (extended === 'true') {
return 'extended_';

View File

@@ -1,8 +1,10 @@
import * as core from '@actions/core';
import * as main from './main';
(async (): Promise<void> => {
try {
main.run();
await main.run();
} catch (e) {
core.setFailed(`Action failed with error ${e}`);
core.setFailed(`Action failed with error ${e.message}`);
}
})();

View File

@@ -59,16 +59,10 @@ export async function installer(version: string): Promise<void> {
const toolAssets: string = await tc.downloadTool(toolURL);
let toolBin = '';
if (process.platform === 'win32') {
const toolExtractedFolder: string = await tc.extractZip(
toolAssets,
tempDir
);
const toolExtractedFolder: string = await tc.extractZip(toolAssets, tempDir);
toolBin = `${toolExtractedFolder}/${Tool.CmdName}.exe`;
} else {
const toolExtractedFolder: string = await tc.extractTar(
toolAssets,
tempDir
);
const toolExtractedFolder: string = await tc.extractTar(toolAssets, tempDir);
toolBin = `${toolExtractedFolder}/${Tool.CmdName}`;
}
await io.mv(toolBin, binDir);

View File

@@ -9,10 +9,7 @@ export interface ActionResult {
output: string;
}
export async function showVersion(
cmd: string,
args: string[]
): Promise<ActionResult> {
export async function showVersion(cmd: string, args: string[]): Promise<ActionResult> {
const result: ActionResult = {
exitcode: 0,
output: ''