From 93805b90eb05c9dd8b3ebba9540ecbf948d7aafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Fri, 21 Feb 2025 00:26:46 +0300 Subject: [PATCH] fix(action): fix quote/space handling in arguments --- .github/workflows/main.yml | 9 +++++++-- run.sh | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d5672a5..4d290a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/run.sh b/run.sh index 2673411..b08b170 100755 --- a/run.sh +++ b/run.sh @@ -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" .