Check no changes (#62)
This commit is contained in:
parent
f0302a8394
commit
63bd035710
|
@ -72,6 +72,11 @@ function run() {
|
||||||
core.info(`✍️ Writing ${fqdn} domain name to ${path.join(tmpdir, 'CNAME')}`);
|
core.info(`✍️ Writing ${fqdn} domain name to ${path.join(tmpdir, 'CNAME')}`);
|
||||||
fs.writeFileSync(path.join(tmpdir, 'CNAME'), fqdn.trim());
|
fs.writeFileSync(path.join(tmpdir, 'CNAME'), fqdn.trim());
|
||||||
}
|
}
|
||||||
|
const dirty = child_process.execSync(`git status --short`, { encoding: 'utf8' }).trim().length > 0;
|
||||||
|
if (keep_history && remote_branch_exists && !dirty) {
|
||||||
|
core.info('⚠️ There are no changes to commit, stopping.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
core.info(`🔨 Configuring git committer to be ${committer_name} <${committer_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.name', committer_name]);
|
||||||
yield exec.exec('git', ['config', 'user.email', committer_email]);
|
yield exec.exec('git', ['config', 'user.email', committer_email]);
|
||||||
|
|
|
@ -59,6 +59,12 @@ async function run() {
|
||||||
fs.writeFileSync(path.join(tmpdir, 'CNAME'), fqdn.trim());
|
fs.writeFileSync(path.join(tmpdir, 'CNAME'), fqdn.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dirty = child_process.execSync(`git status --short`, {encoding: 'utf8'}).trim().length > 0;
|
||||||
|
if (keep_history && remote_branch_exists && !dirty) {
|
||||||
|
core.info('⚠️ There are no changes to commit, stopping.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
core.info(`🔨 Configuring git committer to be ${committer_name} <${committer_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.name', committer_name]);
|
||||||
await exec.exec('git', ['config', 'user.email', committer_email]);
|
await exec.exec('git', ['config', 'user.email', committer_email]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user