feat: support for fail-if-no-changes input

Currently if this action is used and no changes have been made to the
repository, the job will silently continue. This feature adds a new
flag `fail-if-no-changes`, which when enabled causes the job to fail
when there are no changes.
This commit is contained in:
Chris Buckley 2022-01-08 21:48:54 +00:00
parent dcd5fd746d
commit 171a10a802
7 changed files with 21 additions and 5 deletions

View file

@ -226,7 +226,7 @@ describe('create-or-update-branch tests', () => {
false,
ADD_PATHS
)
expect(result.action).toEqual('none')
expect(result.action).toEqual('not-created')
expect(await gitLogMatches([INIT_COMMIT_MESSAGE])).toBeTruthy()
})
@ -1004,7 +1004,7 @@ describe('create-or-update-branch tests', () => {
false,
ADD_PATHS
)
expect(result.action).toEqual('none')
expect(result.action).toEqual('not-created')
expect(await gitLogMatches([INIT_COMMIT_MESSAGE])).toBeTruthy()
})
@ -1869,6 +1869,6 @@ describe('create-or-update-branch tests', () => {
ADD_PATHS
)
// The action cannot successfully create the branch
expect(result.action).toEqual('none')
expect(result.action).toEqual('not-created')
})
})