-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
context.ts
31 lines (29 loc) · 1.05 KB
/
context.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import * as core from '@actions/core';
export interface Inputs {
gpgPrivateKey: string;
passphrase: string;
gitConfigGlobal: boolean;
gitUserSigningkey: boolean;
gitCommitGpgsign: boolean;
gitTagGpgsign: boolean;
gitPushGpgsign: string;
gitCommitterName: string;
gitCommitterEmail: string;
workdir: string;
fingerprint: string;
}
export async function getInputs(): Promise<Inputs> {
return {
gpgPrivateKey: core.getInput('gpg_private_key', {required: true}),
passphrase: core.getInput('passphrase'),
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'),
workdir: core.getInput('workdir') || '.',
fingerprint: core.getInput('fingerprint')
};
}