From 2e1ed624596e253550b66fd7d64f4fd0a803bfc0 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 16 Nov 2019 15:04:57 +0100 Subject: [PATCH] Fix inputs --- README.md | 4 ++-- action.yml | 4 ++-- lib/main.js | 10 +++++----- src/main.ts | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 879af16..b858f69 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,8 @@ Following inputs can be used as `step.with` keys | `keep_history` | Bool | Create incremental commit instead of doing push force (default `false`) | | `allow_empty_commit` | Bool | Allow an empty commit to be created (default `true`) | | `build_dir` | String | Build directory to deploy (**required**) | -| `comitter_name` | String | Commit author's name (default [GITHUB_ACTOR](https://help.github.com/en/github/automating-your-workflow-with-github-actions/using-environment-variables#default-environment-variables) or `github-actions`) | -| `comitter_email` | String | Commit author's email (default `@users.noreply.github.com`) | +| `committer_name` | String | Commit author's name (default [GITHUB_ACTOR](https://help.github.com/en/github/automating-your-workflow-with-github-actions/using-environment-variables#default-environment-variables) or `github-actions`) | +| `committer_email` | String | Commit author's email (default `@users.noreply.github.com`) | | `commit_message` | String | Commit message (default `Deploy to GitHub pages`) | | `fqdn` | String | Write the given domain name to the CNAME file | diff --git a/action.yml b/action.yml index 5518aaa..1526dc8 100644 --- a/action.yml +++ b/action.yml @@ -21,9 +21,9 @@ inputs: build_dir: description: 'Build directory to deploy' required: true - comitter_name: + committer_name: description: 'Commit author''s name' - comitter_email: + committer_email: description: 'Commit author''s email' commit_message: description: 'Commit message' diff --git a/lib/main.js b/lib/main.js index e3c01bb..a615957 100644 --- a/lib/main.js +++ b/lib/main.js @@ -31,8 +31,8 @@ function run() { const keep_history = /true/i.test(core.getInput('keep_history')); const allow_empty_commit = /true/i.test(core.getInput('allow_empty_commit')); const build_dir = core.getInput('build_dir', { required: true }); - const comitter_name = core.getInput('comitter_name') || process.env['GITHUB_ACTOR'] || 'github-actions'; - const comitter_email = core.getInput('comitter_email') || `${comitter_name}@users.noreply.github.com`; + const committer_name = core.getInput('committer_name') || process.env['GITHUB_ACTOR'] || 'github-actions'; + const committer_email = core.getInput('committer_email') || `${committer_name}@users.noreply.github.com`; const commit_message = core.getInput('commit_message') || 'Deploy to GitHub pages'; const fqdn = core.getInput('fqdn'); if (!fs.existsSync(build_dir)) { @@ -72,9 +72,9 @@ function run() { core.info(`✍️ Writing ${fqdn} domain name to ${path.join(build_dir, 'CNAME')}`); fs.writeFileSync(path.join(build_dir, 'CNAME'), fqdn.trim()); } - core.info(`🔨 Configuring git committer to be ${comitter_name} <${comitter_email}>`); - yield exec.exec('git', ['config', 'user.name', comitter_name]); - yield exec.exec('git', ['config', 'user.email', comitter_email]); + core.info(`🔨 Configuring git committer to be ${committer_name} <${committer_email}>`); + yield exec.exec('git', ['config', 'user.name', committer_name]); + yield exec.exec('git', ['config', 'user.email', committer_email]); try { child_process.execSync('git status --porcelain').toString(); } diff --git a/src/main.ts b/src/main.ts index b803a1c..f64996b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,8 +13,8 @@ async function run() { const keep_history: boolean = /true/i.test(core.getInput('keep_history')); const allow_empty_commit: boolean = /true/i.test(core.getInput('allow_empty_commit')); const build_dir: string = core.getInput('build_dir', {required: true}); - const comitter_name: string = core.getInput('comitter_name') || process.env['GITHUB_ACTOR'] || 'github-actions'; - const comitter_email: string = core.getInput('comitter_email') || `${comitter_name}@users.noreply.github.com`; + const committer_name: string = core.getInput('committer_name') || process.env['GITHUB_ACTOR'] || 'github-actions'; + const committer_email: string = core.getInput('committer_email') || `${committer_name}@users.noreply.github.com`; const commit_message: string = core.getInput('commit_message') || 'Deploy to GitHub pages'; const fqdn: string = core.getInput('fqdn'); @@ -59,9 +59,9 @@ async function run() { fs.writeFileSync(path.join(build_dir, 'CNAME'), fqdn.trim()); } - core.info(`🔨 Configuring git committer to be ${comitter_name} <${comitter_email}>`); - await exec.exec('git', ['config', 'user.name', comitter_name]); - await exec.exec('git', ['config', 'user.email', comitter_email]); + core.info(`🔨 Configuring git committer to be ${committer_name} <${committer_email}>`); + await exec.exec('git', ['config', 'user.name', committer_name]); + await exec.exec('git', ['config', 'user.email', committer_email]); try { child_process.execSync('git status --porcelain').toString();