feat(run): toggle trace logs with environment variable (#59)

Now you can enable trace logs via setting the `DEBUG` variable to a value.

It is also now disabled as default.

closes #60
This commit is contained in:
Gabriel Torcat
2025-08-10 09:26:26 +02:00
committed by GitHub
parent a8367219b3
commit 3948e88ea7
2 changed files with 6 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ This action generates a changelog based on your Git history using [git-cliff](ht
### Environment variables
- `OUTPUT`: Output file. (Default: `"git-cliff/CHANGELOG.md"`)
- `DEBUG`: Set to a not empty value (e.g. `"true"`) to print executed commmands. (Default: `unset`)
> [!IMPORTANT]
> Check out the entire history via `fetch-depth: 0` before running this action.

6
run.sh
View File

@@ -1,6 +1,10 @@
#!/bin/bash
set -uxo pipefail
if [[ -n "$DEBUG" ]]; then
set -x
fi
set -uo pipefail
# Avoid file expansion when passing parameters like with '*'
set -o noglob