fix(action): fix quote/space handling in arguments

This commit is contained in:
Orhun Parmaksız
2025-02-21 00:26:46 +03:00
parent 4a4a951bc4
commit 93805b90eb
2 changed files with 9 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
name: Action Test
on: [ push, pull_request ]
on: [push, pull_request]
jobs:
git-cliff-action:
@@ -16,7 +16,12 @@ jobs:
uses: ./
with:
config: fixtures/cliff.toml
args: --verbose --strip 'footer' --exclude-path '.github/**' --tag 0.0.0
args: >
--verbose
--strip 'footer'
--exclude-path '.github/**'
--tag 0.0.0
--with-commit "\'test(changelog): add a custom commit\'"
env:
OUTPUT: fixtures/CHANGELOG.md
- name: Print the changelog

4
run.sh
View File

@@ -23,12 +23,12 @@ mkdir -p "$(dirname $OUTPUT)"
args=$(echo "$@" | xargs)
# Execute git-cliff
GIT_CLIFF_OUTPUT="$OUTPUT" ./bin/${GIT_CLIFF_BIN} $args
eval ./bin/${GIT_CLIFF_BIN} $args --output "$OUTPUT"
exit_code=$?
# Retrieve context
CONTEXT="$(mktemp)"
GIT_CLIFF_OUTPUT="$CONTEXT" ./bin/${GIT_CLIFF_BIN} $args --context
eval ./bin/${GIT_CLIFF_BIN} $args --context --output "$CONTEXT"
# Revert permissions
chown -R "$owner" .