2020-09-06 22:03:16 +02:00
|
|
|
import * as core from '@actions/core';
|
2021-05-09 11:15:20 +02:00
|
|
|
import {issueCommand} from '@actions/core/lib/command';
|
2020-09-06 22:03:16 +02:00
|
|
|
|
|
|
|
export interface Inputs {
|
|
|
|
gpgPrivateKey: string;
|
|
|
|
passphrase: string;
|
|
|
|
gitUserSigningkey: boolean;
|
|
|
|
gitCommitGpgsign: boolean;
|
|
|
|
gitTagGpgsign: boolean;
|
|
|
|
gitPushGpgsign: boolean;
|
|
|
|
gitCommitterName: string;
|
|
|
|
gitCommitterEmail: string;
|
|
|
|
workdir: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function getInputs(): Promise<Inputs> {
|
|
|
|
return {
|
|
|
|
gpgPrivateKey: core.getInput('gpg-private-key', {required: true}),
|
|
|
|
passphrase: core.getInput('passphrase'),
|
2021-08-10 08:42:33 +02:00
|
|
|
gitUserSigningkey: core.getBooleanInput('git-user-signingkey'),
|
|
|
|
gitCommitGpgsign: core.getBooleanInput('git-commit-gpgsign'),
|
|
|
|
gitTagGpgsign: core.getBooleanInput('git-tag-gpgsign'),
|
|
|
|
gitPushGpgsign: core.getBooleanInput('git-push-gpgsign'),
|
2020-09-06 22:03:16 +02:00
|
|
|
gitCommitterName: core.getInput('git-committer-name'),
|
2020-11-24 06:03:54 -06:00
|
|
|
gitCommitterEmail: core.getInput('git-committer-email'),
|
2020-09-06 22:03:16 +02:00
|
|
|
workdir: core.getInput('workdir') || '.'
|
|
|
|
};
|
|
|
|
}
|
2021-05-09 11:15:20 +02:00
|
|
|
|
|
|
|
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777
|
|
|
|
export function setOutput(name: string, value: any): void {
|
|
|
|
issueCommand('set-output', {name}, value);
|
|
|
|
}
|