diff --git a/action.yml b/action.yml index fb9914e..b13ab0f 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,14 @@ branding: icon: 'heart' color: 'red' +inputs: + username: + description: 'Github Username' + required: true + pat: + description: 'Github PAT' + required: true + runs: using: node20 main: dist/index.js diff --git a/src/main.ts b/src/main.ts index d469d49..c429f7a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,22 +7,13 @@ import simpleGit from "simple-git"; */ export async function run(): Promise { try { - const commitMessage: string = core.getInput('commitMessage') - const tagMessage: string = core.getInput('tagMessage') - const tagVersion: string = core.getInput('tagVersion') - const branchName: string = core.getInput('branchName') - - core.debug(`commitMessage: ${commitMessage}`) - core.debug(`tagMessage: ${tagMessage}`) - core.debug(`tagVersion: ${tagVersion}`) - core.debug(`branchName: ${branchName}`) - + const username: string = core.getInput('username') + const pat: string = core.getInput('pat') const git = simpleGit(); - //git subtree push --prefix subtreeDirectory https://github.com/newfivefour/vimrc.git master - await git.raw("subtree", "push", "--prefix", "kmp", "https://github.com/kpgalligan/SharedKotlin.git", "testbranch") + await git.raw("subtree", "push", "--prefix", "kmp", `https://${username}:${pat}@github.com/kpgalligan/SharedKotlin.git`, "testbranch") } catch (error) { // Fail the workflow run if an error occurs if (error instanceof Error) core.setFailed(error.message)