Compare commits

...

59 Commits

Author SHA1 Message Date
peaceiris
e35c200d21 chore(release): 2.4.5 2020-02-04 11:47:09 +09:00
peaceiris
1710cea6fb chore(release): Add build assets 2020-02-04 11:47:08 +09:00
dependabot-preview[bot]
3907220f13 deps: bump @typescript-eslint/eslint-plugin from 2.18.0 to 2.19.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 02:45:41 +00:00
dependabot-preview[bot]
747598e8dc deps: bump @typescript-eslint/parser from 2.18.0 to 2.19.0 (#170)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 11:41:35 +09:00
dependabot-preview[bot]
022950c85b deps: bump ts-jest from 25.1.0 to 25.2.0
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.1.0 to 25.2.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.1.0...v25.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 02:33:29 +00:00
dependabot-preview[bot]
e375f4fff3 deps: bump @types/node from 13.5.3 to 13.7.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.3 to 13.7.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-03 02:31:19 +00:00
dependabot-preview[bot]
ac7a2d661b deps: bump lint-staged from 10.0.6 to 10.0.7
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.6 to 10.0.7.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.6...v10.0.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-03 02:26:23 +00:00
Shohei Ueda
40cba97ea7 docs: add Dependabot badge 2020-01-31 11:39:37 +09:00
dependabot-preview[bot]
e8c9424357 deps: bump @types/node from 13.5.2 to 13.5.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.2 to 13.5.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-31 02:27:04 +00:00
dependabot-preview[bot]
aa532f2f96 deps: bump lint-staged from 10.0.5 to 10.0.6
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.5 to 10.0.6.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.5...v10.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 14:17:48 +00:00
dependabot-preview[bot]
24f14e4ba9 deps: bump ts-jest from 25.0.0 to 25.1.0
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.0.0 to 25.1.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.0.0...v25.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 14:16:54 +00:00
dependabot-preview[bot]
2fb0c15ce0 deps: bump lint-staged from 10.0.4 to 10.0.5
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.4 to 10.0.5.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.4...v10.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 06:42:54 +00:00
dependabot-preview[bot]
f18cf68aea deps: bump @types/jest from 25.1.0 to 25.1.1
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.0 to 25.1.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 03:23:49 +00:00
dependabot-preview[bot]
aed27b9707 deps: bump @types/node from 13.5.1 to 13.5.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.1 to 13.5.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 03:19:14 +00:00
dependabot-preview[bot]
4f359ec551 deps: bump lint-staged from 10.0.3 to 10.0.4
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.3 to 10.0.4.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.3...v10.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 03:17:55 +00:00
dependabot-preview[bot]
a9aa73f7b4 deps: bump @types/node from 13.5.0 to 13.5.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.0 to 13.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 02:30:30 +00:00
peaceiris
aeba6547bb chore: Add engines field 2020-01-29 11:03:45 +09:00
peaceiris
8eef9fcb44 chore(release): Remove build assets [skip ci] 2020-01-28 11:33:14 +09:00
peaceiris
3cb9216401 chore(release): 2.4.4 2020-01-28 11:33:13 +09:00
peaceiris
20ff13abbd chore(release): Add build assets 2020-01-28 11:33:13 +09:00
dependabot-preview[bot]
6812c21f18 deps: bump @typescript-eslint/parser from 2.17.0 to 2.18.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.17.0 to 2.18.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.18.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-28 02:28:30 +00:00
dependabot-preview[bot]
a1b1127907 deps: bump @typescript-eslint/eslint-plugin from 2.17.0 to 2.18.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.17.0 to 2.18.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.18.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-28 02:24:18 +00:00
dependabot-preview[bot]
02c90246b4 deps: bump @types/jest from 24.9.1 to 25.1.0
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.9.1 to 25.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-28 02:20:28 +00:00
dependabot-preview[bot]
5000d1a8b6 deps: bump lint-staged from 10.0.2 to 10.0.3
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.2 to 10.0.3.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.2...v10.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-28 02:19:47 +00:00
Shohei Ueda
63038f397f docs: update badge 2020-01-27 12:29:34 +09:00
Shohei Ueda
7e8dab4a15 ci: use github/hub install script [skip ci]
https://github.com/github/hub/issues/2249
https://github.com/github/hub/pull/2453
https://github.com/actions/virtual-environments/issues/36
2020-01-26 20:31:36 +09:00
Shohei Ueda
8f4af8fa35 chore: update name 2020-01-26 18:32:24 +09:00
Shohei Ueda
b8b4d74381 docs: Add release feed badge 2020-01-26 17:13:42 +09:00
Shohei Ueda
94853340b9 fix: action failure status (#151)
Close #149

* chore: fix path to .gitconfig
2020-01-25 12:42:32 +09:00
Shohei Ueda
de65f3e128 ci: remove operations-per-run 2020-01-25 12:00:51 +09:00
Shohei Ueda
c00fd7be83 chore: update git (#150)
* chore: rename image name
* chore: add git v2.25.0
* chore: enhance Dockerfile
2020-01-25 11:56:09 +09:00
peaceiris
7c0de2ddec chore: ignore failure 2020-01-25 02:30:13 +09:00
peaceiris
236f382aa6 chore(release): Remove build assets [skip ci] 2020-01-24 13:37:15 +09:00
peaceiris
1bb54b05c8 chore(release): 2.4.3 2020-01-24 13:37:14 +09:00
peaceiris
b28afd97fa chore(release): Add build assets 2020-01-24 13:37:14 +09:00
dependabot-preview[bot]
46a6a3afdf deps: bump @actions/tool-cache from 1.3.0 to 1.3.1
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.3.0 to 1.3.1.
- [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-preview[bot] <support@dependabot.com>
2020-01-24 04:33:47 +00:00
dependabot-preview[bot]
6e5afb7c2e deps: bump @actions/core from 1.2.1 to 1.2.2
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-24 04:25:45 +00:00
Shohei Ueda
737fda5741 chore: Change update_schedule from weekly to daily 2020-01-24 06:37:05 +09:00
peaceiris
c58f4ce12d chore(release): Remove build assets [skip ci] 2020-01-24 06:32:10 +09:00
peaceiris
95afbe8abf chore(release): 2.4.2 2020-01-24 06:32:09 +09:00
peaceiris
8f7332cde6 chore(release): Add build assets 2020-01-24 06:32:09 +09:00
dependabot-preview[bot]
699805b6e1 deps: bump standard-version from 7.0.1 to 7.1.0 (#145)
Bumps [standard-version](https://github.com/conventional-changelog/standard-version) from 7.0.1 to 7.1.0.
- [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/v7.0.1...v7.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-24 06:29:50 +09:00
dependabot-preview[bot]
2550d0ecb0 deps: bump @types/jest from 24.9.0 to 24.9.1
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.9.0 to 24.9.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 21:25:32 +00:00
dependabot-preview[bot]
692ded2284 deps: bump @typescript-eslint/parser from 2.16.0 to 2.17.0 (#144)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.17.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-24 06:21:03 +09:00
dependabot-preview[bot]
e9732216ce deps: bump husky from 4.0.10 to 4.2.1
Bumps [husky](https://github.com/typicode/husky) from 4.0.10 to 4.2.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typicode/husky/compare/v4.0.10...v4.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 21:17:16 +00:00
dependabot-preview[bot]
3315ca857b deps: bump jest and ts-jest
Bumps [jest](https://github.com/facebook/jest) and [ts-jest](https://github.com/kulshekhar/ts-jest). These dependencies needed to be updated together.

Updates `jest` from 24.9.0 to 25.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/compare/v24.9.0...v25.1.0)

Updates `ts-jest` from 24.3.0 to 25.0.0
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v24.3.0...v25.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 21:12:39 +00:00
dependabot-preview[bot]
8d85402748 deps: bump @types/node from 13.1.8 to 13.5.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.8 to 13.5.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 21:06:26 +00:00
dependabot-preview[bot]
b4a0e8ba60 deps: bump jest-circus from 24.9.0 to 25.1.0
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 24.9.0 to 25.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/v25.1.0/packages/jest-circus)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 20:58:36 +00:00
dependabot-preview[bot]
66d664bedd deps: bump @typescript-eslint/eslint-plugin from 2.16.0 to 2.17.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.17.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 20:54:20 +00:00
dependabot-preview[bot]
87e38e224d deps: bump lint-staged from 10.0.0 to 10.0.2
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.0 to 10.0.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.0...v10.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 20:50:09 +00:00
Shohei Ueda
4fb2901627 style: remove extra whitespace [skip ci] 2020-01-24 00:20:16 +09:00
Shohei Ueda
7a50ddc694 ci: Add Hugo version dump step 2020-01-24 00:17:39 +09:00
Shohei Ueda
b55f1c81fb test: Add fail to fetch latest due to 404 (#137) 2020-01-21 01:35:00 +09:00
Shohei Ueda
0311892edd docs: Add Codecov badge
docs: Remove Coveralls badge
2020-01-21 01:08:43 +09:00
Shohei Ueda
94ce32ea1b ci: Add codecov/codecov-action@v1 (#136)
ci: Comment out coverallsapp/github-action@v1.0.1
2020-01-21 01:04:46 +09:00
peaceiris
3317963a65 deps: update 2020-01-20 05:09:09 +09:00
Shohei Ueda
a79f520add docs: Update action execution time 2020-01-19 16:35:39 +09:00
Shohei Ueda
b6a7551978 ci: Add operations-per-run 1 2020-01-19 15:37:28 +09:00
peaceiris
490ff3b995 chore(release): Remove build assets [skip ci] 2020-01-18 12:36:55 +09:00
19 changed files with 6177 additions and 2378 deletions

View File

@@ -2,7 +2,7 @@ version: 1
update_configs: update_configs:
- package_manager: "javascript" - package_manager: "javascript"
directory: "/" directory: "/"
update_schedule: "weekly" update_schedule: "daily"
default_labels: default_labels:
- "dependencies" - "dependencies"
commit_message: commit_message:

View File

@@ -1,7 +1,2 @@
.* .*
*
!.eslintrc.json
!.prettierrc.json
coverage
node_modules

View File

@@ -7,3 +7,7 @@ indent_size = 2
indent_style = space indent_style = space
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
[Makefile]
indent_size = 4
indent_style = tab

View File

@@ -17,17 +17,10 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}" run: echo "${GITHUB_CONTEXT}"
- name: Install hub - name: Install github/hub
run: | run: |
HUB_VERSION="2.13.0" export HUB_VERSION="2.14.1"
HUB_NAME="hub-linux-amd64-${HUB_VERSION}" curl -fsSL https://github.com/github/hub/raw/40e421edd2c63d57bb8daa4bb9bbdfa21e8becf9/script/get | bash -s "${HUB_VERSION}"
HUB_TARBALL="${HUB_NAME}.tgz"
wget -q "https://github.com/github/hub/releases/download/v${HUB_VERSION}/${HUB_TARBALL}"
tar -zxvf "./${HUB_TARBALL}"
mkdir ~/bin
cp "./${HUB_NAME}/bin/hub" ~/bin/
echo "::add-path::~/bin/"
rm -rf "./${HUB_NAME}" "./${HUB_TARBALL}"
- name: Create release - name: Create release
env: env:
@@ -35,8 +28,9 @@ jobs:
run: | run: |
TAG_NAME="${GITHUB_REF##refs/tags/}" TAG_NAME="${GITHUB_REF##refs/tags/}"
echo "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details." > ./release_notes.md echo "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details." > ./release_notes.md
sed -i "1iRelease ${TAG_NAME}\n" ./release_notes.md RELEASE_NAME="$(jq -r '.name' ./package.json)"
hub release create \ sed -i "1i${RELEASE_NAME} ${TAG_NAME}\n" ./release_notes.md
./bin/hub release create \
--draft \ --draft \
--prerelease \ --prerelease \
--file ./release_notes.md \ --file ./release_notes.md \

View File

@@ -30,4 +30,9 @@ jobs:
hugo-version: ${{ matrix.hugo-version }} hugo-version: ${{ matrix.hugo-version }}
extended: ${{ matrix.extended }} extended: ${{ matrix.extended }}
- run: hugo version - name: Run hugo version
run: echo "::set-output name=hugo_version::$(hugo version)"
id: hugo_version
- name: '${{ steps.hugo_version.outputs.hugo_version }}'
run: echo '${{ steps.hugo_version.outputs.hugo_version }}'

View File

@@ -76,14 +76,18 @@ jobs:
name: coverage name: coverage
path: coverage path: coverage
- name: Upload test coverage to Coveralls - uses: codecov/codecov-action@v1
uses: coverallsapp/github-action@v1.0.1
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
parallel: true
- name: Coveralls Finished # - name: Upload test coverage to Coveralls
uses: coverallsapp/github-action@v1.0.1 # uses: coverallsapp/github-action@v1.0.1
with: # with:
github-token: ${{ secrets.GITHUB_TOKEN }} # github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true # parallel: true
# - name: Coveralls Finished
# uses: coverallsapp/github-action@v1.0.1
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
engine-strict=true

View File

@@ -2,6 +2,118 @@
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. 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.5](https://github.com/peaceiris/actions-hugo/compare/v2.4.4...v2.4.5) (2020-02-04)
### chore
* Add engines field ([aeba654](https://github.com/peaceiris/actions-hugo/commit/aeba6547bbb28e39b29e7d03f6978c80d6c09931))
### deps
* bump @types/jest from 25.1.0 to 25.1.1 ([f18cf68](https://github.com/peaceiris/actions-hugo/commit/f18cf68aea6a7d00504e6335efedb30a14f8c021))
* bump @types/node from 13.5.0 to 13.5.1 ([a9aa73f](https://github.com/peaceiris/actions-hugo/commit/a9aa73f7b42aadd8e6bbbf77ad51143b99f18e40))
* bump @types/node from 13.5.1 to 13.5.2 ([aed27b9](https://github.com/peaceiris/actions-hugo/commit/aed27b97077aed97ef3c9e27ee7066a5a7a55c40))
* bump @types/node from 13.5.2 to 13.5.3 ([e8c9424](https://github.com/peaceiris/actions-hugo/commit/e8c9424357a611602420145f8f289752b2521863))
* bump @types/node from 13.5.3 to 13.7.0 ([e375f4f](https://github.com/peaceiris/actions-hugo/commit/e375f4fff3fc25ace239150a37912746292b4e67))
* bump @typescript-eslint/eslint-plugin from 2.18.0 to 2.19.0 ([3907220](https://github.com/peaceiris/actions-hugo/commit/3907220f13b04e23a4d300439cdc11b05ea034c1))
* bump @typescript-eslint/parser from 2.18.0 to 2.19.0 (#170) ([747598e](https://github.com/peaceiris/actions-hugo/commit/747598e8dc8f2f8ea8c3a8964531e3c7fa1b11d7)), closes [#170](https://github.com/peaceiris/actions-hugo/issues/170)
* bump lint-staged from 10.0.3 to 10.0.4 ([4f359ec](https://github.com/peaceiris/actions-hugo/commit/4f359ec551fa404b81d7a5832b16a3729874c611))
* bump lint-staged from 10.0.4 to 10.0.5 ([2fb0c15](https://github.com/peaceiris/actions-hugo/commit/2fb0c15ce023c9b4831e1acab7d97c0ba50d5a9d))
* bump lint-staged from 10.0.5 to 10.0.6 ([aa532f2](https://github.com/peaceiris/actions-hugo/commit/aa532f2f962cb4c9473f59fd4adbf67f4bfc3554))
* bump lint-staged from 10.0.6 to 10.0.7 ([ac7a2d6](https://github.com/peaceiris/actions-hugo/commit/ac7a2d661b0cb2b28f9967e2c65567f3b6ef9abc))
* bump ts-jest from 25.0.0 to 25.1.0 ([24f14e4](https://github.com/peaceiris/actions-hugo/commit/24f14e4ba907ee0920a608a0cf204387f1a26d53))
* bump ts-jest from 25.1.0 to 25.2.0 ([022950c](https://github.com/peaceiris/actions-hugo/commit/022950c85b46b0e873e66b5d6732b02ea09aa566))
### docs
* add Dependabot badge ([40cba97](https://github.com/peaceiris/actions-hugo/commit/40cba97ea7d81fcbaccd754f9d4e2f28db6afbf3))
## [2.4.4](https://github.com/peaceiris/actions-hugo/compare/v2.4.3...v2.4.4) (2020-01-28)
### chore
* ignore failure ([7c0de2d](https://github.com/peaceiris/actions-hugo/commit/7c0de2ddec0ad6a617eed9a78836b75151c9f870))
* update git (#150) ([c00fd7b](https://github.com/peaceiris/actions-hugo/commit/c00fd7be83dad02c1e07a09bfb526a3e2d67fa75)), closes [#150](https://github.com/peaceiris/actions-hugo/issues/150)
* update name ([8f4af8f](https://github.com/peaceiris/actions-hugo/commit/8f4af8fa35a55337783683108d969c57a9541dae))
### ci
* remove operations-per-run ([de65f3e](https://github.com/peaceiris/actions-hugo/commit/de65f3e1283667e67fe0676a6498d02951ee22d5))
* use github/hub install script [skip ci] ([7e8dab4](https://github.com/peaceiris/actions-hugo/commit/7e8dab4a1585bb1241a44c53eeae4acc25fe0661))
### deps
* bump @types/jest from 24.9.1 to 25.1.0 ([02c9024](https://github.com/peaceiris/actions-hugo/commit/02c90246b441e21119ffe228b29c43ac443ca688))
* bump @typescript-eslint/eslint-plugin from 2.17.0 to 2.18.0 ([a1b1127](https://github.com/peaceiris/actions-hugo/commit/a1b1127907729bf5a7533f63111feaf16919ee1b))
* bump @typescript-eslint/parser from 2.17.0 to 2.18.0 ([6812c21](https://github.com/peaceiris/actions-hugo/commit/6812c21f1895dbef58aca3a976d0d3852d660dd0))
* bump lint-staged from 10.0.2 to 10.0.3 ([5000d1a](https://github.com/peaceiris/actions-hugo/commit/5000d1a8b64a136a7350b3f3debc93fb21872a06))
### docs
* Add release feed badge ([b8b4d74](https://github.com/peaceiris/actions-hugo/commit/b8b4d743819166af3ff7f530bbdc6d3480913cb9))
* update badge ([63038f3](https://github.com/peaceiris/actions-hugo/commit/63038f397f199600101c79aca6bc505c8718d1b7))
### fix
* action failure status (#151) ([9485334](https://github.com/peaceiris/actions-hugo/commit/94853340b9510c41a18016dbaa8d41e42044300c)), closes [#151](https://github.com/peaceiris/actions-hugo/issues/151) [#149](https://github.com/peaceiris/actions-hugo/issues/149)
## [2.4.3](https://github.com/peaceiris/actions-hugo/compare/v2.4.2...v2.4.3) (2020-01-24)
### chore
* Change update_schedule from weekly to daily ([737fda5](https://github.com/peaceiris/actions-hugo/commit/737fda5741cb12d8992d4c75e249bd0392e162a7))
### deps
* bump @actions/core from 1.2.1 to 1.2.2 ([6e5afb7](https://github.com/peaceiris/actions-hugo/commit/6e5afb7c2e3739813acca54db234f1c13cf1e596))
* bump @actions/tool-cache from 1.3.0 to 1.3.1 ([46a6a3a](https://github.com/peaceiris/actions-hugo/commit/46a6a3afdff838a10f9f9e063170cfc02c197611))
## [2.4.2](https://github.com/peaceiris/actions-hugo/compare/v2.4.1...v2.4.2) (2020-01-23)
### ci
* Add codecov/codecov-action@v1 (#136) ([94ce32e](https://github.com/peaceiris/actions-hugo/commit/94ce32ea1b2965037ef7bbec618476ed6ad7b9e6)), closes [#136](https://github.com/peaceiris/actions-hugo/issues/136)
* Add Hugo version dump step ([7a50ddc](https://github.com/peaceiris/actions-hugo/commit/7a50ddc6941e49c88a35080315a84a684c825347))
* Add operations-per-run 1 ([b6a7551](https://github.com/peaceiris/actions-hugo/commit/b6a75519788da01712462416009e656ec0b9cc8d))
### deps
* bump @types/jest from 24.9.0 to 24.9.1 ([2550d0e](https://github.com/peaceiris/actions-hugo/commit/2550d0ecb023988fa8061c6270a46e9d67bb84dc))
* bump @types/node from 13.1.8 to 13.5.0 ([8d85402](https://github.com/peaceiris/actions-hugo/commit/8d854027489e6b4b9130701c3a826185aca6bfae))
* bump @typescript-eslint/eslint-plugin from 2.16.0 to 2.17.0 ([66d664b](https://github.com/peaceiris/actions-hugo/commit/66d664bedd9b4a5d5004dc4023557305c4d69d97))
* bump @typescript-eslint/parser from 2.16.0 to 2.17.0 (#144) ([692ded2](https://github.com/peaceiris/actions-hugo/commit/692ded22845285c58250414c6389365f01229c49)), closes [#144](https://github.com/peaceiris/actions-hugo/issues/144)
* bump husky from 4.0.10 to 4.2.1 ([e973221](https://github.com/peaceiris/actions-hugo/commit/e9732216ceb5db53dac31f61b0bb7d03db346f3a))
* bump jest and ts-jest ([3315ca8](https://github.com/peaceiris/actions-hugo/commit/3315ca857b7ee10f6c9de622898e44583fd81132))
* bump jest-circus from 24.9.0 to 25.1.0 ([b4a0e8b](https://github.com/peaceiris/actions-hugo/commit/b4a0e8ba604f9aeccee1f7b409870b3605de8544))
* bump lint-staged from 10.0.0 to 10.0.2 ([87e38e2](https://github.com/peaceiris/actions-hugo/commit/87e38e224d4a8f50a19dc9904c0bb85f707197bd))
* bump standard-version from 7.0.1 to 7.1.0 (#145) ([699805b](https://github.com/peaceiris/actions-hugo/commit/699805b6e156fb30665896aa7c1cbbca130a1364)), closes [#145](https://github.com/peaceiris/actions-hugo/issues/145)
* update ([3317963](https://github.com/peaceiris/actions-hugo/commit/3317963a656646a401fcf4d1420b50f5908e3be0))
### docs
* Add Codecov badge ([0311892](https://github.com/peaceiris/actions-hugo/commit/0311892edd4e91aac6a95a003243e44ad3a54fe0))
* Update action execution time ([a79f520](https://github.com/peaceiris/actions-hugo/commit/a79f520addd8c317fcb9b29e8ecc4a8b0ecc43ae))
### style
* remove extra whitespace [skip ci] ([4fb2901](https://github.com/peaceiris/actions-hugo/commit/4fb290162762a7f823fcab1984966da8d8aed547))
### test
* Add fail to fetch latest due to 404 (#137) ([b55f1c8](https://github.com/peaceiris/actions-hugo/commit/b55f1c81fb24bc6149b3a7ec4cb9aa6c9596e877)), closes [#137](https://github.com/peaceiris/actions-hugo/issues/137)
## [2.4.1](https://github.com/peaceiris/actions-hugo/compare/v2.4.0...v2.4.1) (2020-01-18) ## [2.4.1](https://github.com/peaceiris/actions-hugo/compare/v2.4.0...v2.4.1) (2020-01-18)

28
Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
ARG NODE_VERSION
FROM node:${NODE_VERSION}-buster-slim
SHELL ["/bin/bash", "-l", "-c"]
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev autoconf \
ca-certificates \
wget && \
rm -rf /var/lib/apt/lists/*
WORKDIR /git
ENV GIT_VERSION="2.25.0"
RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
tar -zxf "./v${GIT_VERSION}.tar.gz" && \
rm "./v${GIT_VERSION}.tar.gz" && \
cd "./git-${GIT_VERSION}" && \
make configure && \
./configure --prefix=/usr && \
make all && \
make install
WORKDIR /repo
CMD [ "bash" ]

View File

@@ -1,8 +1,9 @@
cmd := "bash" cmd := "bash"
msg := "" msg := ""
IMAGE_NAME := actions-hugo-dev:latest IMAGE_NAME := actions_hugo_dev:latest
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --file ./__tests__/Dockerfile NODE_VERSION := $(shell cat ./.nvmrc)
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/etc/gitconfig $(IMAGE_NAME) 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)
.PHONY: build .PHONY: build

View File

@@ -1,9 +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/master/LICENSE)
[![release](https://img.shields.io/github/release/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases/latest) [![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) [![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases)
![GitHub Actions status](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg) ![Test](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg?branch=master&event=push)
[![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-hugo/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-hugo) [![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-hugo/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
[![Coverage Status](https://coveralls.io/repos/github/peaceiris/actions-hugo/badge.svg?branch=master)](https://coveralls.io/github/peaceiris/actions-hugo?branch=master) [![codecov](https://codecov.io/gh/peaceiris/actions-hugo/branch/master/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-hugo)
[![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-hugo/releases.atom)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=peaceiris/actions-hugo)](https://dependabot.com)
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg"> <img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
@@ -18,7 +20,7 @@ This **Hugo Setup Action** can install **Hugo** to a virtual machine of **GitHub
From `v2`, this Hugo Setup Action has migrated to a JavaScript (TypeScript) action. From `v2`, this Hugo Setup Action has migrated to a JavaScript (TypeScript) action.
We no longer build or pull a Hugo docker image. We no longer build or pull a Hugo docker image.
Thanks to this change, we can complete this action less than **1 sec**. Thanks to this change, we can complete this action in less than a few seconds.
(A docker base action was taking about 1 min or more execution time to build and pull a docker image.) (A docker base action was taking about 1 min or more execution time to build and pull a docker image.)
| OS (runs-on) | ubuntu-18.04 | macos-latest | windows-2019 | | OS (runs-on) | ubuntu-18.04 | macos-latest | windows-2019 |

View File

@@ -1,11 +0,0 @@
FROM node:12-slim
WORKDIR /repo
RUN apt-get update && \
apt-get -y install --no-install-recommends \
git \
bash && \
rm -rf /var/lib/apt/lists/*
CMD [ "bash" ]

View File

@@ -3,25 +3,23 @@ import * as io from '@actions/io';
import path from 'path'; import path from 'path';
import nock from 'nock'; import nock from 'nock';
import {Tool, Action} from '../src/constants'; import {Tool, Action} from '../src/constants';
// import {FetchError} from 'node-fetch'; import {FetchError} from 'node-fetch';
import jsonTestBrew from './data/brew.json'; import jsonTestBrew from './data/brew.json';
// import jsonTestGithub from './data/github.json'; // import jsonTestGithub from './data/github.json';
jest.setTimeout(30000); jest.setTimeout(30000);
beforeEach(() => {
jest.resetModules();
});
afterEach(() => {
delete process.env['INPUT_HUGO-VERSION'];
nock.cleanAll();
});
describe('Integration testing run()', () => { describe('Integration testing run()', () => {
beforeEach(() => {
jest.resetModules();
});
afterEach(async () => { afterEach(async () => {
const workDir = path.join(`${process.env.HOME}`, Action.WorkDirName); const workDir = path.join(`${process.env.HOME}`, Action.WorkDirName);
await io.rmRF(workDir); await io.rmRF(workDir);
delete process.env['INPUT_HUGO-VERSION'];
nock.cleanAll();
}); });
test('succeed in installing a custom version', async () => { test('succeed in installing a custom version', async () => {
@@ -69,6 +67,15 @@ describe('Integration testing run()', () => {
); );
expect(result.output).toMatch(`extended`); 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);
await expect(main.run()).rejects.toThrowError(FetchError);
});
}); });
describe('showVersion()', () => { describe('showVersion()', () => {

View File

@@ -934,6 +934,13 @@ class ExecState extends events.EventEmitter {
/***/ }), /***/ }),
/***/ 16:
/***/ (function(module) {
module.exports = require("tls");
/***/ }),
/***/ 18: /***/ 18:
/***/ (function() { /***/ (function() {
@@ -1006,28 +1013,22 @@ function showVersion(cmd, args) {
exports.showVersion = showVersion; exports.showVersion = showVersion;
function run() { function run() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { const toolVersion = core.getInput('hugo-version');
const toolVersion = core.getInput('hugo-version'); let installVersion = '';
let installVersion = ''; let result = {
let result = { exitcode: 0,
exitcode: 0, output: ''
output: '' };
}; if (toolVersion === '' || toolVersion === 'latest') {
if (toolVersion === '' || toolVersion === 'latest') { installVersion = yield get_latest_version_1.getLatestVersion(constants_1.Tool.Org, constants_1.Tool.Repo, 'brew');
installVersion = yield get_latest_version_1.getLatestVersion(constants_1.Tool.Org, constants_1.Tool.Repo, 'brew');
}
else {
installVersion = toolVersion;
}
core.info(`${constants_1.Tool.Name} version: ${installVersion}`);
yield installer_1.installer(installVersion);
result = yield showVersion(constants_1.Tool.CmdName, [constants_1.Tool.CmdOptVersion]);
return result;
} }
catch (e) { else {
core.setFailed(`Action failed with error ${e}`); installVersion = toolVersion;
return e;
} }
core.info(`${constants_1.Tool.Name} version: ${installVersion}`);
yield installer_1.installer(installVersion);
result = yield showVersion(constants_1.Tool.CmdName, [constants_1.Tool.CmdOptVersion]);
return result;
}); });
} }
exports.run = run; exports.run = run;
@@ -1050,10 +1051,274 @@ module.exports = function nodeRNG() {
/***/ }), /***/ }),
/***/ 157: /***/ 141:
/***/ (function() { /***/ (function(__unusedmodule, exports, __webpack_require__) {
eval("require")("tunnel"); "use strict";
var net = __webpack_require__(631);
var tls = __webpack_require__(16);
var http = __webpack_require__(605);
var https = __webpack_require__(211);
var events = __webpack_require__(614);
var assert = __webpack_require__(357);
var util = __webpack_require__(669);
exports.httpOverHttp = httpOverHttp;
exports.httpsOverHttp = httpsOverHttp;
exports.httpOverHttps = httpOverHttps;
exports.httpsOverHttps = httpsOverHttps;
function httpOverHttp(options) {
var agent = new TunnelingAgent(options);
agent.request = http.request;
return agent;
}
function httpsOverHttp(options) {
var agent = new TunnelingAgent(options);
agent.request = http.request;
agent.createSocket = createSecureSocket;
agent.defaultPort = 443;
return agent;
}
function httpOverHttps(options) {
var agent = new TunnelingAgent(options);
agent.request = https.request;
return agent;
}
function httpsOverHttps(options) {
var agent = new TunnelingAgent(options);
agent.request = https.request;
agent.createSocket = createSecureSocket;
agent.defaultPort = 443;
return agent;
}
function TunnelingAgent(options) {
var self = this;
self.options = options || {};
self.proxyOptions = self.options.proxy || {};
self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;
self.requests = [];
self.sockets = [];
self.on('free', function onFree(socket, host, port, localAddress) {
var options = toOptions(host, port, localAddress);
for (var i = 0, len = self.requests.length; i < len; ++i) {
var pending = self.requests[i];
if (pending.host === options.host && pending.port === options.port) {
// Detect the request to connect same origin server,
// reuse the connection.
self.requests.splice(i, 1);
pending.request.onSocket(socket);
return;
}
}
socket.destroy();
self.removeSocket(socket);
});
}
util.inherits(TunnelingAgent, events.EventEmitter);
TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {
var self = this;
var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));
if (self.sockets.length >= this.maxSockets) {
// We are over limit so we'll add it to the queue.
self.requests.push(options);
return;
}
// If we are under maxSockets create a new one.
self.createSocket(options, function(socket) {
socket.on('free', onFree);
socket.on('close', onCloseOrRemove);
socket.on('agentRemove', onCloseOrRemove);
req.onSocket(socket);
function onFree() {
self.emit('free', socket, options);
}
function onCloseOrRemove(err) {
self.removeSocket(socket);
socket.removeListener('free', onFree);
socket.removeListener('close', onCloseOrRemove);
socket.removeListener('agentRemove', onCloseOrRemove);
}
});
};
TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
var self = this;
var placeholder = {};
self.sockets.push(placeholder);
var connectOptions = mergeOptions({}, self.proxyOptions, {
method: 'CONNECT',
path: options.host + ':' + options.port,
agent: false,
headers: {
host: options.host + ':' + options.port
}
});
if (options.localAddress) {
connectOptions.localAddress = options.localAddress;
}
if (connectOptions.proxyAuth) {
connectOptions.headers = connectOptions.headers || {};
connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
new Buffer(connectOptions.proxyAuth).toString('base64');
}
debug('making CONNECT request');
var connectReq = self.request(connectOptions);
connectReq.useChunkedEncodingByDefault = false; // for v0.6
connectReq.once('response', onResponse); // for v0.6
connectReq.once('upgrade', onUpgrade); // for v0.6
connectReq.once('connect', onConnect); // for v0.7 or later
connectReq.once('error', onError);
connectReq.end();
function onResponse(res) {
// Very hacky. This is necessary to avoid http-parser leaks.
res.upgrade = true;
}
function onUpgrade(res, socket, head) {
// Hacky.
process.nextTick(function() {
onConnect(res, socket, head);
});
}
function onConnect(res, socket, head) {
connectReq.removeAllListeners();
socket.removeAllListeners();
if (res.statusCode !== 200) {
debug('tunneling socket could not be established, statusCode=%d',
res.statusCode);
socket.destroy();
var error = new Error('tunneling socket could not be established, ' +
'statusCode=' + res.statusCode);
error.code = 'ECONNRESET';
options.request.emit('error', error);
self.removeSocket(placeholder);
return;
}
if (head.length > 0) {
debug('got illegal response body from proxy');
socket.destroy();
var error = new Error('got illegal response body from proxy');
error.code = 'ECONNRESET';
options.request.emit('error', error);
self.removeSocket(placeholder);
return;
}
debug('tunneling connection has established');
self.sockets[self.sockets.indexOf(placeholder)] = socket;
return cb(socket);
}
function onError(cause) {
connectReq.removeAllListeners();
debug('tunneling socket could not be established, cause=%s\n',
cause.message, cause.stack);
var error = new Error('tunneling socket could not be established, ' +
'cause=' + cause.message);
error.code = 'ECONNRESET';
options.request.emit('error', error);
self.removeSocket(placeholder);
}
};
TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
var pos = this.sockets.indexOf(socket)
if (pos === -1) {
return;
}
this.sockets.splice(pos, 1);
var pending = this.requests.shift();
if (pending) {
// If we have pending requests and a socket gets closed a new one
// needs to be created to take over in the pool for the one that closed.
this.createSocket(pending, function(socket) {
pending.request.onSocket(socket);
});
}
};
function createSecureSocket(options, cb) {
var self = this;
TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
var hostHeader = options.request.getHeader('host');
var tlsOptions = mergeOptions({}, self.options, {
socket: socket,
servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host
});
// 0 is dummy port for v0.6
var secureSocket = tls.connect(0, tlsOptions);
self.sockets[self.sockets.indexOf(socket)] = secureSocket;
cb(secureSocket);
});
}
function toOptions(host, port, localAddress) {
if (typeof host === 'string') { // since v0.10
return {
host: host,
port: port,
localAddress: localAddress
};
}
return host; // for v0.11 or later
}
function mergeOptions(target) {
for (var i = 1, len = arguments.length; i < len; ++i) {
var overrides = arguments[i];
if (typeof overrides === 'object') {
var keys = Object.keys(overrides);
for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
var k = keys[j];
if (overrides[k] !== undefined) {
target[k] = overrides[k];
}
}
}
}
return target;
}
var debug;
if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
debug = function() {
var args = Array.prototype.slice.call(arguments);
if (typeof args[0] === 'string') {
args[0] = 'TUNNEL: ' + args[0];
} else {
args.unshift('TUNNEL:');
}
console.error.apply(console, args);
}
} else {
debug = function() {};
}
exports.debug = debug; // for test
/***/ }), /***/ }),
@@ -1128,8 +1393,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result; return result;
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(__webpack_require__(470));
const main = __importStar(__webpack_require__(131)); const main = __importStar(__webpack_require__(131));
main.run(); try {
main.run();
}
catch (e) {
core.setFailed(`Action failed with error ${e}`);
}
/***/ }), /***/ }),
@@ -1160,17 +1431,24 @@ module.exports = require("crypto");
"use strict"; "use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const os = __webpack_require__(87); const os = __importStar(__webpack_require__(87));
/** /**
* Commands * Commands
* *
* Command Format: * Command Format:
* ##[name key=value;key=value]message * ::name key=value,key=value::message
* *
* Examples: * Examples:
* ##[warning]This is the user warning message * ::warning::This is the message
* ##[set-secret name=mypassword]definitelyNotAPassword! * ::set-env name=MY_VAR::some value
*/ */
function issueCommand(command, properties, message) { function issueCommand(command, properties, message) {
const cmd = new Command(command, properties, message); const cmd = new Command(command, properties, message);
@@ -1206,30 +1484,28 @@ class Command {
else { else {
cmdStr += ','; cmdStr += ',';
} }
// safely append the val - avoid blowing up when attempting to cmdStr += `${key}=${escapeProperty(val)}`;
// call .replace() if message is not a string for some reason
cmdStr += `${key}=${escape(`${val || ''}`)}`;
} }
} }
} }
} }
cmdStr += CMD_STRING; cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
// safely append the message - avoid blowing up when attempting to
// call .replace() if message is not a string for some reason
const message = `${this.message || ''}`;
cmdStr += escapeData(message);
return cmdStr; return cmdStr;
} }
} }
function escapeData(s) { function escapeData(s) {
return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A'); return (s || '')
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A');
} }
function escape(s) { function escapeProperty(s) {
return s return (s || '')
.replace(/%/g, '%25')
.replace(/\r/g, '%0D') .replace(/\r/g, '%0D')
.replace(/\n/g, '%0A') .replace(/\n/g, '%0A')
.replace(/]/g, '%5D') .replace(/:/g, '%3A')
.replace(/;/g, '%3B'); .replace(/,/g, '%2C');
} }
//# sourceMappingURL=command.js.map //# sourceMappingURL=command.js.map
@@ -2924,10 +3200,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next()); step((generator = generator.apply(thisArg, _arguments || [])).next());
}); });
}; };
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const command_1 = __webpack_require__(431); const command_1 = __webpack_require__(431);
const os = __webpack_require__(87); const os = __importStar(__webpack_require__(87));
const path = __webpack_require__(622); const path = __importStar(__webpack_require__(622));
/** /**
* The code to exit an action * The code to exit an action
*/ */
@@ -3126,15 +3409,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next()); step((generator = generator.apply(thisArg, _arguments || [])).next());
}); });
}; };
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const core = __webpack_require__(470); const core = __importStar(__webpack_require__(470));
const io = __webpack_require__(1); const io = __importStar(__webpack_require__(1));
const fs = __webpack_require__(747); const fs = __importStar(__webpack_require__(747));
const os = __webpack_require__(87); const os = __importStar(__webpack_require__(87));
const path = __webpack_require__(622); const path = __importStar(__webpack_require__(622));
const httpm = __webpack_require__(539); const httpm = __importStar(__webpack_require__(539));
const semver = __webpack_require__(550); const semver = __importStar(__webpack_require__(550));
const uuidV4 = __webpack_require__(826); const v4_1 = __importDefault(__webpack_require__(826));
const exec_1 = __webpack_require__(986); const exec_1 = __webpack_require__(986);
const assert_1 = __webpack_require__(357); const assert_1 = __webpack_require__(357);
class HTTPError extends Error { class HTTPError extends Error {
@@ -3188,7 +3481,7 @@ function downloadTool(url, dest) {
allowRetries: true, allowRetries: true,
maxRetries: 3 maxRetries: 3
}); });
dest = dest || path.join(tempDirectory, uuidV4()); dest = dest || path.join(tempDirectory, v4_1.default());
yield io.mkdirP(path.dirname(dest)); yield io.mkdirP(path.dirname(dest));
core.debug(`Downloading ${url}`); core.debug(`Downloading ${url}`);
core.debug(`Downloading ${dest}`); core.debug(`Downloading ${dest}`);
@@ -3525,7 +3818,7 @@ function _createExtractFolder(dest) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
if (!dest) { if (!dest) {
// create a temp dir // create a temp dir
dest = path.join(tempDirectory, uuidV4()); dest = path.join(tempDirectory, v4_1.default());
} }
yield io.mkdirP(dest); yield io.mkdirP(dest);
return dest; return dest;
@@ -3594,7 +3887,6 @@ const url = __webpack_require__(835);
const http = __webpack_require__(605); const http = __webpack_require__(605);
const https = __webpack_require__(211); const https = __webpack_require__(211);
const pm = __webpack_require__(950); const pm = __webpack_require__(950);
let fs;
let tunnel; let tunnel;
var HttpCodes; var HttpCodes;
(function (HttpCodes) { (function (HttpCodes) {
@@ -3625,6 +3917,15 @@ var HttpCodes;
HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
/**
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
function getProxyUrl(serverUrl) {
let proxyUrl = pm.getProxyUrl(url.parse(serverUrl));
return proxyUrl ? proxyUrl.href : '';
}
exports.getProxyUrl = getProxyUrl;
const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect]; const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect];
const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout]; const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout];
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
@@ -3815,7 +4116,6 @@ class HttpClient {
*/ */
requestRawWithCallback(info, data, onResult) { requestRawWithCallback(info, data, onResult) {
let socket; let socket;
let isDataString = typeof (data) === 'string';
if (typeof (data) === 'string') { if (typeof (data) === 'string') {
info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8'); info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8');
} }
@@ -3858,6 +4158,15 @@ class HttpClient {
req.end(); req.end();
} }
} }
/**
* Gets an http agent. This function is useful when you need an http agent that handles
* routing through a proxy server - depending upon the url and proxy environment variables.
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
getAgent(serverUrl) {
let parsedUrl = url.parse(serverUrl);
return this._getAgent(parsedUrl);
}
_prepareRequest(method, requestUrl, headers) { _prepareRequest(method, requestUrl, headers) {
const info = {}; const info = {};
info.parsedUrl = requestUrl; info.parsedUrl = requestUrl;
@@ -3911,7 +4220,7 @@ class HttpClient {
if (useProxy) { if (useProxy) {
// If using proxy, need tunnel // If using proxy, need tunnel
if (!tunnel) { if (!tunnel) {
tunnel = __webpack_require__(157); tunnel = __webpack_require__(856);
} }
const agentOptions = { const agentOptions = {
maxSockets: maxSockets, maxSockets: maxSockets,
@@ -5586,6 +5895,13 @@ module.exports = require("path");
/***/ }), /***/ }),
/***/ 631:
/***/ (function(module) {
module.exports = require("net");
/***/ }),
/***/ 669: /***/ 669:
/***/ (function(module) { /***/ (function(module) {
@@ -5906,6 +6222,14 @@ module.exports = v4;
module.exports = require("url"); module.exports = require("url");
/***/ }),
/***/ 856:
/***/ (function(module, __unusedexports, __webpack_require__) {
module.exports = __webpack_require__(141);
/***/ }), /***/ }),
/***/ 901: /***/ 901:
@@ -6051,23 +6375,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
const url = __webpack_require__(835); const url = __webpack_require__(835);
function getProxyUrl(reqUrl) { function getProxyUrl(reqUrl) {
let usingSsl = reqUrl.protocol === 'https:'; let usingSsl = reqUrl.protocol === 'https:';
let noProxy = process.env["no_proxy"] ||
process.env["NO_PROXY"];
let bypass;
if (noProxy && typeof noProxy === 'string') {
let bypassList = noProxy.split(',');
for (let i = 0; i < bypassList.length; i++) {
let item = bypassList[i];
if (item &&
typeof item === "string" &&
reqUrl.host.toLocaleLowerCase() == item.trim().toLocaleLowerCase()) {
bypass = true;
break;
}
}
}
let proxyUrl; let proxyUrl;
if (bypass) { if (checkBypass(reqUrl)) {
return proxyUrl; return proxyUrl;
} }
let proxyVar; let proxyVar;
@@ -6085,6 +6394,39 @@ function getProxyUrl(reqUrl) {
return proxyUrl; return proxyUrl;
} }
exports.getProxyUrl = getProxyUrl; exports.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
}
let noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || '';
if (!noProxy) {
return false;
}
// Determine the request port
let reqPort;
if (reqUrl.port) {
reqPort = Number(reqUrl.port);
}
else if (reqUrl.protocol === 'http:') {
reqPort = 80;
}
else if (reqUrl.protocol === 'https:') {
reqPort = 443;
}
// Format the request hostname and hostname with port
let upperReqHosts = [reqUrl.hostname.toUpperCase()];
if (typeof reqPort === 'number') {
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
}
// Compare request host against noproxy
for (let upperNoProxyItem of noProxy.split(',').map(x => x.trim().toUpperCase()).filter(x => x)) {
if (upperReqHosts.some(x => x === upperNoProxyItem)) {
return true;
}
}
return false;
}
exports.checkBypass = checkBypass;
/***/ }), /***/ }),

7734
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,12 @@
{ {
"name": "hugo-action", "name": "actions-hugo",
"version": "2.4.1", "version": "2.4.5",
"description": "GitHub Actions for Hugo", "description": "GitHub Actions for Hugo",
"main": "lib/index.js", "main": "lib/index.js",
"engines": {
"node": ">=12.14.1",
"npm": ">=6.13.7"
},
"scripts": { "scripts": {
"lint": "eslint ./{src,__tests__}/**/*.ts", "lint": "eslint ./{src,__tests__}/**/*.ts",
"lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts", "lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts",
@@ -25,8 +29,7 @@
"src/**/*.ts": [ "src/**/*.ts": [
"prettier --check", "prettier --check",
"eslint", "eslint",
"jest --bail --findRelatedTests", "jest --bail --findRelatedTests"
"git add"
] ]
}, },
"repository": { "repository": {
@@ -48,29 +51,29 @@
}, },
"homepage": "https://github.com/peaceiris/actions-hugo#readme", "homepage": "https://github.com/peaceiris/actions-hugo#readme",
"dependencies": { "dependencies": {
"@actions/core": "^1.2.1", "@actions/core": "^1.2.2",
"@actions/exec": "^1.0.3", "@actions/exec": "^1.0.3",
"@actions/io": "^1.0.2", "@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.3.0", "@actions/tool-cache": "^1.3.1",
"node-fetch": "^2.6.0" "node-fetch": "^2.6.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^24.9.0", "@types/jest": "^25.1.1",
"@types/node": "^13.1.7", "@types/node": "^13.7.0",
"@types/node-fetch": "^2.5.4", "@types/node-fetch": "^2.5.4",
"@typescript-eslint/eslint-plugin": "^2.16.0", "@typescript-eslint/eslint-plugin": "^2.19.0",
"@typescript-eslint/parser": "^2.16.0", "@typescript-eslint/parser": "^2.19.0",
"@zeit/ncc": "^0.21.0", "@zeit/ncc": "^0.21.0",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-plugin-jest": "^23.6.0", "eslint-plugin-jest": "^23.6.0",
"husky": "^4.0.10", "husky": "^4.2.1",
"jest": "^24.9.0", "jest": "^25.1.0",
"jest-circus": "^24.9.0", "jest-circus": "^25.1.0",
"lint-staged": "^9.5.0", "lint-staged": "^10.0.7",
"nock": "^11.7.2", "nock": "^11.7.2",
"prettier": "1.19.1", "prettier": "1.19.1",
"standard-version": "^7.0.1", "standard-version": "^7.1.0",
"ts-jest": "^24.3.0", "ts-jest": "^25.2.0",
"typescript": "^3.7.5" "typescript": "^3.7.5"
} }
} }

View File

@@ -27,7 +27,7 @@ fi
git fetch origin git fetch origin
git pull origin master git pull origin master
git tag -d v2 git tag -d v2 || true
git pull origin --tags git pull origin --tags
npm ci npm ci

View File

@@ -1,3 +1,8 @@
import * as core from '@actions/core';
import * as main from './main'; import * as main from './main';
main.run(); try {
main.run();
} catch (e) {
core.setFailed(`Action failed with error ${e}`);
}

View File

@@ -34,28 +34,23 @@ export async function showVersion(
} }
export async function run(): Promise<ActionResult> { export async function run(): Promise<ActionResult> {
try { const toolVersion: string = core.getInput('hugo-version');
const toolVersion: string = core.getInput('hugo-version'); let installVersion = '';
let installVersion = '';
let result: ActionResult = { let result: ActionResult = {
exitcode: 0, exitcode: 0,
output: '' output: ''
}; };
if (toolVersion === '' || toolVersion === 'latest') { if (toolVersion === '' || toolVersion === 'latest') {
installVersion = await getLatestVersion(Tool.Org, Tool.Repo, 'brew'); installVersion = await getLatestVersion(Tool.Org, Tool.Repo, 'brew');
} else { } else {
installVersion = toolVersion; installVersion = toolVersion;
}
core.info(`${Tool.Name} version: ${installVersion}`);
await installer(installVersion);
result = await showVersion(Tool.CmdName, [Tool.CmdOptVersion]);
return result;
} catch (e) {
core.setFailed(`Action failed with error ${e}`);
return e;
} }
core.info(`${Tool.Name} version: ${installVersion}`);
await installer(installVersion);
result = await showVersion(Tool.CmdName, [Tool.CmdOptVersion]);
return result;
} }