diff --git a/action.yml b/action.yml index ab24bb8..8d1cdf4 100644 --- a/action.yml +++ b/action.yml @@ -40,6 +40,8 @@ runs: ${{ github.action_path }}/scripts/read-cliff-version.sh - name: Generate git-cliff config + env: + ACTION_PATH: ${{ github.action_path }} shell: bash run: | ${{ github.action_path }}/scripts/generate-git-cliff-config.sh diff --git a/scripts/generate-git-cliff-config.sh b/scripts/generate-git-cliff-config.sh index 6dc0f3c..2d5f53a 100755 --- a/scripts/generate-git-cliff-config.sh +++ b/scripts/generate-git-cliff-config.sh @@ -6,7 +6,7 @@ CLIFF_CONFIG="cliff.toml" # Check if cliff.toml exists, if not, copy cliff.toml.template from the Action if [ ! -f "$CLIFF_CONFIG" ]; then echo "cliff.toml not found, using template from action." - cp "${GITHUB_ACTION_PATH:-${github_action_path:-${{ github.action_path }}}}/cliff.toml.template" "$CLIFF_CONFIG" + cp "$ACTION_PATH/cliff.toml.template" "$CLIFF_CONFIG" # Replace placeholders in the copied config OWNER="${GITHUB_REPOSITORY%/*}" REPO="${GITHUB_REPOSITORY#*/}"