1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

Merge pull request #126 from shimataro/develop

version 2.0.1
This commit is contained in:
shimataro 2020-03-14 14:27:49 +09:00 committed by GitHub
commit 262770b68b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 721 additions and 891 deletions

View file

@ -7,7 +7,6 @@ extends:
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
plugins:
- import
- "@typescript-eslint"
parser: "@typescript-eslint/parser"
parserOptions:
@ -60,7 +59,7 @@ rules: # https://eslint.org/docs/rules/
- property
dot-notation:
- error
- allowKeywords: true
- allowPattern: "^_"
eol-last: error
eqeqeq: error
for-direction: error
@ -72,14 +71,16 @@ rules: # https://eslint.org/docs/rules/
func-style:
- error
- declaration
function-paren-newline: error
function-paren-newline:
- error
- multiline-arguments
generator-star-spacing: error
getter-return: error
global-require: error
guard-for-in: error
handle-callback-err: error
id-blacklist: error
id-length: 'off'
id-length: error
id-match: error
implicit-arrow-linebreak:
- error
@ -94,13 +95,15 @@ rules: # https://eslint.org/docs/rules/
keyword-spacing:
- error
- overrides:
if:
catch:
after: false
for:
after: false
while:
if:
after: false
catch:
switch:
after: false
while:
after: false
with:
after: false
@ -113,6 +116,7 @@ rules: # https://eslint.org/docs/rules/
lines-between-class-members:
- error
- always
- exceptAfterSingleLine: true
max-depth: error
max-len: 'off'
max-lines: 'off'
@ -147,6 +151,7 @@ rules: # https://eslint.org/docs/rules/
no-extra-bind: error
no-extra-label: error
no-extra-parens: error
no-extra-semi: error
no-floating-decimal: error
no-implicit-coercion: error
no-implicit-globals: error
@ -256,7 +261,10 @@ rules: # https://eslint.org/docs/rules/
semi-style:
- error
- last
sort-imports: 'off'
sort-imports:
- error
- ignoreCase: false
ignoreDeclarationSort: true
sort-keys: 'off'
sort-vars: error
space-before-blocks: error
@ -281,8 +289,14 @@ rules: # https://eslint.org/docs/rules/
- never
valid-jsdoc:
- error
- requireParamType: false
- prefer:
arg: param
argument: param
return: returns
yield: yields
exception: throws
requireReturn: false
requireParamType: false
requireReturnType: false
vars-on-top: error
wrap-iife: error
@ -292,13 +306,9 @@ rules: # https://eslint.org/docs/rules/
- error
- never
# import plugin
import/extensions: 'off'
import/no-unresolved:
- error
# @typescript-eslint plugin
"@typescript-eslint/explicit-function-return-type": 'off'
"@typescript-eslint/ban-ts-ignore": 'off'
"@typescript-eslint/no-empty-interface": 'off'
"@typescript-eslint/no-use-before-define":
- error
- functions: false

View file

@ -1,7 +1,9 @@
MD007:
MD007: # ul-indent
indent: 4
MD013:
MD013: # line-length
line_length: 255
MD024:
MD024: # no-duplicate-heading
siblings_only: true
MD026: false
MD026: false # no-trailing-punctuation
MD029: # ol-prefix
style: one

View file

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
## [2.0.1] - 2020-03-14
### Security
* update [acorn](https://www.npmjs.com/package/acorn) to 7.1.1 ([CVE-2020-7598](https://github.com/advisories/GHSA-7fhm-mqm4-2wp7))
## [2.0.0] - 2020-02-08
### Changed
@ -91,7 +97,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* First release.
[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v2.0.0...HEAD
[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v2.0.1...HEAD
[2.0.1]: https://github.com/shimataro/ssh-key-action/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/shimataro/ssh-key-action/compare/v1.6.5...v2.0.0
[1.6.5]: https://github.com/shimataro/ssh-key-action/compare/v1.6.4...v1.6.5
[1.6.4]: https://github.com/shimataro/ssh-key-action/compare/v1.6.3...v1.6.4

View file

@ -99,6 +99,11 @@ Here are some solutions:
### Which one is the best way for transferring files, "direct SCP/SFTP/rsync" or "SCP/SFTP/rsync via bastion"?
I recommend **rsync via bastion**.
```bash
rsync -e "ssh bastion ssh" ./foo/ target:bar/
```
It has some advantages over other methods:
* "Rsync via bastion" doesn't require to update workflow files and `secrets` even if it is necessary to transfer files to multiple servers.

View file

@ -82,6 +82,12 @@ try {
core.warning('myInput was not set');
}
if (core.isDebug()) {
// curl -v https://github.com
} else {
// curl https://github.com
}
// Do stuff
}
catch (err) {

View file

@ -55,6 +55,10 @@ export declare function setOutput(name: string, value: string): void;
* @param message add error issue message
*/
export declare function setFailed(message: string): void;
/**
* Gets whether Actions Step Debug is on or not
*/
export declare function isDebug(): boolean;
/**
* Writes debug message to user log
* @param message debug message

View file

@ -104,6 +104,13 @@ exports.setFailed = setFailed;
//-----------------------------------------------------------------------
// Logging Commands
//-----------------------------------------------------------------------
/**
* Gets whether Actions Step Debug is on or not
*/
function isDebug() {
return process.env['RUNNER_DEBUG'] === '1';
}
exports.isDebug = isDebug;
/**
* Writes debug message to user log
* @param message debug message

View file

@ -1 +1 @@
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAE7C,uCAAwB;AACxB,2CAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;G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E,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"}

View file

@ -1,6 +1,6 @@
{
"name": "@actions/core",
"version": "1.2.2",
"version": "1.2.3",
"description": "Actions core lib",
"keywords": [
"github",
@ -38,7 +38,7 @@
"@types/node": "^12.0.2"
}
,"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz"
,"_integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg=="
,"_from": "@actions/core@1.2.2"
,"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz"
,"_integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w=="
,"_from": "@actions/core@1.2.3"
}

1499
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "install-ssh-key",
"version": "2.0.0",
"version": "2.0.1",
"private": true,
"description": "Install SSH key in .ssh",
"main": "lib/main.js",
@ -31,18 +31,17 @@
"author": "shimataro",
"license": "MIT",
"dependencies": {
"@actions/core": "1.2.2"
"@actions/core": "1.2.3"
},
"devDependencies": {
"@types/node": "13.7.0",
"@typescript-eslint/eslint-plugin": "2.19.0",
"@typescript-eslint/parser": "2.19.0",
"@types/node": "13.9.1",
"@typescript-eslint/eslint-plugin": "2.23.0",
"@typescript-eslint/parser": "2.23.0",
"eslint": "6.8.0",
"eslint-plugin-import": "2.20.1",
"markdownlint-cli": "0.21.0",
"npm-check-updates": "4.0.1",
"markdownlint-cli": "0.22.0",
"npm-check-updates": "4.0.4",
"npm-run-all": "4.1.5",
"typescript": "3.7.5",
"typescript": "3.8.3",
"yaml-lint": "1.2.4"
}
}

View file

@ -2,11 +2,10 @@
set -e
rm -rf node_modules package-lock.json
npm i
npm ci
npm run build
npm run verify
rm -rf node_modules
npm ci --only=production
git add node_modules package-lock.json lib
git add node_modules lib