diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee86b6a..1b0030b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: uses: ./ with: config: fixtures/cliff.toml - args: --verbose --strip footer + args: --verbose --strip 'footer' --exclude-path '.github/**' env: OUTPUT: fixtures/CHANGELOG.md - name: Print the changelog diff --git a/entrypoint.sh b/entrypoint.sh index b8036b3..fde33e9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,13 +1,19 @@ #!/bin/bash -l set -uxo pipefail +# Avoid file expansion when passing parameters like with '*' +set -o noglob + OUTPUT=${OUTPUT:="git-cliff/CHANGELOG.md"} # Create the output directory mkdir -p "$(dirname $OUTPUT)" +# Separate arguments before passing them to git-cliff command +args=$(echo "$@" | xargs) + # Execute git-cliff -GIT_CLIFF_OUTPUT="$OUTPUT" git-cliff $@ +GIT_CLIFF_OUTPUT="$OUTPUT" git-cliff $args exit_code=$? # Output to console