From e9c10d622158b5d02d29a7816d52d668edccf578 Mon Sep 17 00:00:00 2001 From: shimataro Date: Wed, 18 Sep 2019 22:19:02 +0900 Subject: [PATCH] * use double quotes for string --- README.md | 2 +- action.yml | 22 +++++++++++----------- lib/main.js | 6 +++--- src/main.ts | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 6de1f63..b862fb2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ steps: with: private-key: ${{ secret.SSH_KEY }} public-key: ${{ secret.SSH_KEY_PUBLIC }} - name: 'id_rsa' # optional + name: id_rsa # optional - name: Install packages run: apt install openssh-client rsync - name: rsync over ssh diff --git a/action.yml b/action.yml index cda2719..9b5cd2a 100644 --- a/action.yml +++ b/action.yml @@ -1,19 +1,19 @@ -name: 'Install SSH Key' -description: 'Install SSH key to ~/.ssh' -author: 'shimataro' +name: "Install SSH Key" +description: "Install SSH key to ~/.ssh" +author: "shimataro" branding: - icon: 'terminal' - color: 'gray-dark' + icon: "terminal" + color: "gray-dark" inputs: private-key: - description: 'private SSH key' + description: "private SSH key" required: true public-key: - description: 'public SSH key' + description: "public SSH key" required: true name: - description: 'SSH key file name (default: id_rsa)' - default: 'id_rsa' + description: "SSH key file name (default: id_rsa)" + default: "id_rsa" runs: - using: 'node12' - main: 'lib/main.js' + using: "node12" + main: "lib/main.js" diff --git a/lib/main.js b/lib/main.js index 645750b..56db58f 100644 --- a/lib/main.js +++ b/lib/main.js @@ -18,9 +18,9 @@ function main() { recursive: true, mode: 0o700, }); - const privateKey = core.getInput('private-key'); - const publicKey = core.getInput('public-key'); - const name = core.getInput('name'); + const privateKey = core.getInput("private-key"); + const publicKey = core.getInput("public-key"); + const name = core.getInput("name"); const fileName = path.resolve(dirName, name); fs.writeFileSync(fileName, privateKey, { mode: 0o400, diff --git a/src/main.ts b/src/main.ts index 3bdef44..2e1262a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ import * as fs from "fs"; -import * as path from 'path'; +import * as path from "path"; -import * as core from '@actions/core'; +import * as core from "@actions/core"; function main(): void { @@ -14,9 +14,9 @@ function main(): void mode: 0o700, }); - const privateKey = core.getInput('private-key') as string; - const publicKey = core.getInput('public-key') as string; - const name = core.getInput('name') as string; + const privateKey = core.getInput("private-key") as string; + const publicKey = core.getInput("public-key") as string; + const name = core.getInput("name") as string; const fileName = path.resolve(dirName, name); fs.writeFileSync(fileName, privateKey, {