mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-11-06 02:08:05 +00:00
Create flag to disable globbing
This commit is contained in:
parent
f4f9aedbee
commit
be370eccae
@ -52,6 +52,9 @@ inputs:
|
|||||||
description: Skip the call to git-fetch.
|
description: Skip the call to git-fetch.
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
|
disable_globbing:
|
||||||
|
description: Stop the shell from expanding filenames (https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html)
|
||||||
|
default: false
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
changes_detected:
|
changes_detected:
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
set -o noglob;
|
|
||||||
|
if "$INPUT_DISABLE_GLOBBING"; then
|
||||||
|
set -o noglob;
|
||||||
|
fi
|
||||||
|
|
||||||
_main() {
|
_main() {
|
||||||
_switch_to_repository
|
_switch_to_repository
|
||||||
|
@ -22,6 +22,7 @@ setup() {
|
|||||||
export INPUT_PUSH_OPTIONS=""
|
export INPUT_PUSH_OPTIONS=""
|
||||||
export INPUT_SKIP_DIRTY_CHECK=false
|
export INPUT_SKIP_DIRTY_CHECK=false
|
||||||
export INPUT_SKIP_FETCH=false
|
export INPUT_SKIP_FETCH=false
|
||||||
|
export INPUT_DISABLE_GLOBBING=false
|
||||||
|
|
||||||
# Configure Git
|
# Configure Git
|
||||||
if [[ -z $(git config user.name) ]]; then
|
if [[ -z $(git config user.name) ]]; then
|
||||||
@ -422,6 +423,7 @@ git_auto_commit() {
|
|||||||
# ---
|
# ---
|
||||||
|
|
||||||
INPUT_FILE_PATTERN="*.py"
|
INPUT_FILE_PATTERN="*.py"
|
||||||
|
INPUT_DISABLE_GLOBBING=true
|
||||||
|
|
||||||
run git_auto_commit
|
run git_auto_commit
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user