diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 3b88146..8f67a4a 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -113,7 +113,7 @@ describe('run function', () => { const gitMock: jest.Mocked = { status: jest.fn().mockResolvedValue({ - files: [{ path: './**/README.md' }] + files: [{ path: './README.md' }] }), addConfig: jest.fn().mockResolvedValue(undefined), add: jest.fn().mockResolvedValue(undefined), @@ -145,7 +145,7 @@ describe('run function', () => { 'user.email', 'user@email.com' ) - expect(gitMock.add).toHaveBeenCalledWith(['./**/README.md']) + expect(gitMock.add).toHaveBeenCalledWith(['./README.md']) expect(gitMock.commit).toHaveBeenCalledWith('message') expect(gitMock.push).toHaveBeenCalledTimes(1) expect(setOutputMock).toHaveBeenCalledWith('helm-docs', '/mocked/path') diff --git a/dist/index.js b/dist/index.js index eb813bf..3e97e2a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -34890,7 +34890,7 @@ async function run() { case gitPush === 'true': await git.addConfig('user.name', gitPushUserName); await git.addConfig('user.email', gitPushUserEmail); - await git.add([`${chartSearchRoot}/**/${outputFile}`]); + await git.add([`${chartSearchRoot}/${outputFile}`]); await git.commit(gitCommitMessage); await git.push(); core.info(`Pushed '${outputFile}' to the branch.`); diff --git a/src/main.ts b/src/main.ts index e04d6ea..eaf8805 100644 --- a/src/main.ts +++ b/src/main.ts @@ -55,7 +55,7 @@ export async function run(): Promise { case gitPush === 'true': await git.addConfig('user.name', gitPushUserName) await git.addConfig('user.email', gitPushUserEmail) - await git.add([`${chartSearchRoot}/**/${outputFile}`]) + await git.add([`${chartSearchRoot}/${outputFile}`]) await git.commit(gitCommitMessage) await git.push() core.info(`Pushed '${outputFile}' to the branch.`)