Fix inputs

This commit is contained in:
CrazyMax 2019-11-16 15:04:57 +01:00
parent ad788b5e67
commit 2e1ed62459
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
4 changed files with 14 additions and 14 deletions

View File

@ -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 `<committer_name>@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 `<committer_name>@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 |

View File

@ -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'

View File

@ -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();
}

View File

@ -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();