2020-09-06 22:03:16 +02:00
|
|
|
import * as core from '@actions/core';
|
|
|
|
|
|
|
|
export interface Inputs {
|
|
|
|
gpgPrivateKey: string;
|
|
|
|
passphrase: string;
|
2023-05-06 18:20:11 +02:00
|
|
|
trustLevel: string;
|
2021-08-10 09:28:13 +02:00
|
|
|
gitConfigGlobal: boolean;
|
2020-09-06 22:03:16 +02:00
|
|
|
gitUserSigningkey: boolean;
|
|
|
|
gitCommitGpgsign: boolean;
|
|
|
|
gitTagGpgsign: boolean;
|
2021-08-10 08:46:50 +02:00
|
|
|
gitPushGpgsign: string;
|
2020-09-06 22:03:16 +02:00
|
|
|
gitCommitterName: string;
|
|
|
|
gitCommitterEmail: string;
|
|
|
|
workdir: string;
|
2021-10-15 13:40:04 +02:00
|
|
|
fingerprint: string;
|
2020-09-06 22:03:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export async function getInputs(): Promise<Inputs> {
|
|
|
|
return {
|
2021-09-05 01:12:28 +02:00
|
|
|
gpgPrivateKey: core.getInput('gpg_private_key', {required: true}),
|
2020-09-06 22:03:16 +02:00
|
|
|
passphrase: core.getInput('passphrase'),
|
2023-05-06 18:20:11 +02:00
|
|
|
trustLevel: core.getInput('trust_level'),
|
2021-09-05 01:12:28 +02:00
|
|
|
gitConfigGlobal: core.getBooleanInput('git_config_global'),
|
|
|
|
gitUserSigningkey: core.getBooleanInput('git_user_signingkey'),
|
|
|
|
gitCommitGpgsign: core.getBooleanInput('git_commit_gpgsign'),
|
|
|
|
gitTagGpgsign: core.getBooleanInput('git_tag_gpgsign'),
|
|
|
|
gitPushGpgsign: core.getInput('git_push_gpgsign') || 'if-asked',
|
|
|
|
gitCommitterName: core.getInput('git_committer_name'),
|
|
|
|
gitCommitterEmail: core.getInput('git_committer_email'),
|
2021-10-15 13:40:04 +02:00
|
|
|
workdir: core.getInput('workdir') || '.',
|
|
|
|
fingerprint: core.getInput('fingerprint')
|
2020-09-06 22:03:16 +02:00
|
|
|
};
|
|
|
|
}
|