Skip to content

Commit

Permalink
feat: Option to add signed-off-by in commit message (#5)
Browse files Browse the repository at this point in the history
* Update action.yml

Optionally sign-off commits

* Update action.yml

Fixed missing input prefix

* Fix: Explicitly label when inputs.sign-off-commit matches false

Signed-off-by: Matthew Watkins <[email protected]>

---------

Signed-off-by: Matthew Watkins <[email protected]>
  • Loading branch information
ModeSevenIndustrialSolutions authored Nov 30, 2023
1 parent f631780 commit 7f59dbf
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
description: "Whether install PDM plugins before update"
required: false
default: "false"
sign-off-commit:
description: "Whether commit message contains signed-off-by"
required: false
default: "false"

runs:
using: "composite"
Expand All @@ -46,7 +50,16 @@ runs:
fi
- name: "Commit changes"
if: steps.detect-changes.outputs.changed == 'true'
if: steps.detect-changes.outputs.changed == 'true' && inputs.sign-off-commit == 'true'
uses: EndBug/add-and-commit@v9
with:
commit: --signoff
message: ${{ inputs.commit-message }}
new_branch: dep/update-pdm-lock
push: origin dep/update-pdm-lock --set-upstream --force

- name: "Commit changes"
if: steps.detect-changes.outputs.changed == 'true' && inputs.sign-off-commit == 'false'
uses: EndBug/add-and-commit@v9
with:
message: ${{ inputs.commit-message }}
Expand Down

0 comments on commit 7f59dbf

Please sign in to comment.