diff --git a/action.yml b/action.yml index 7f33d21..19e63c0 100644 --- a/action.yml +++ b/action.yml @@ -10,6 +10,14 @@ inputs: description: 'what type of release is this, one of (ruby, python, node, terraform-module)' required: false default: '' + git-username: + description: 'the username to use when pushing to git' + required: false + default: '' + git-password: + description: 'the password to use when pushing to git' + required: false + default: '' path: description: "create a release from a path other than the repository's root" required: false diff --git a/src/index.ts b/src/index.ts index 87b9825..850c5d3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,6 +33,8 @@ interface ActionInputs { path?: string; githubApiUrl: string; githubGraphqlUrl: string; + gitUsername?: string; + gitPassword?: string; configFile?: string; manifestFile?: string; proxyServer?: string; @@ -50,6 +52,8 @@ function parseInputs(): ActionInputs { releaseType: getOptionalInput('release-type'), path: getOptionalInput('path'), repoUrl: core.getInput('repo-url') || process.env.GITHUB_REPOSITORY || '', + gitUsername: core.getInput('git-username'), + gitPassword: core.getInput('git-password'), targetBranch: getOptionalInput('target-branch'), configFile: core.getInput('config-file') || DEFAULT_CONFIG_FILE, manifestFile: core.getInput('manifest-file') || DEFAULT_MANIFEST_FILE, @@ -149,6 +153,8 @@ function getGitHubInstance(inputs: ActionInputs): Promise { repo, apiUrl: inputs.githubApiUrl, graphqlUrl: inputs.githubGraphqlUrl, + gitUsername: inputs.gitUsername, + gitPassword: inputs.gitPassword, token: inputs.token, defaultBranch: inputs.targetBranch, };