feat: allow passing options to git-add (#150)

* feat: allow passing options to git-add

* doc: small cleanup

* chore: typo, detailed error message on git-add

---------

Co-authored-by: Conrad <grosserconrad@gmail.com>
This commit is contained in:
Oluf Lorenzen
2025-09-10 14:48:45 +02:00
committed by GitHub
parent 6b98d6d1d4
commit bf5539213f
3 changed files with 26 additions and 21 deletions

View File

@@ -125,11 +125,11 @@ if _git_changed; then
exit 1
fi
else
# Calling method to configure the git environemnt
# Calling method to configure the git environment
_git_setup
# Add changes to git
git add "${INPUT_FILE_PATTERN}" || echo "Problem adding your files with pattern ${INPUT_FILE_PATTERN}"
git add ${INPUT_ADD_OPTIONS:+"$INPUT_ADD_OPTIONS"} "${INPUT_FILE_PATTERN}" || echo -e "Problem adding your files via 'git add':\n flags: ${INPUT_ADD_OPTIONS:+"$INPUT_ADD_OPTIONS"}\n pattern: ${INPUT_FILE_PATTERN}"
if $INPUT_NO_COMMIT; then
echo "There are changes that won't be commited, you can use an external job to do so."