diff --git a/README.md b/README.md index 58d39e4..c0a71bf 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,9 @@ workflow [`step-summary`][step-summary], and Pull Request reviews (with Create a new GitHub Actions workflow in your project, e.g. at [.github/workflows/cpp-linter.yml](https://github.com/cpp-linter/cpp-linter-action/blob/main/.github/workflows/cpp-linter.yml) > [!TIP] -> To enable color output in the workflow logs, set the environment variable `CPP_LINTER_COLOR` to a value of `on` or `true` or `1`. +> To enable color output in the workflow logs, +> set the environment variable `CPP_LINTER_COLOR` to a +> value of `on`, `true`, or `1`. The content of the file should be in the following format. diff --git a/action.yml b/action.yml index 156f160..4b67e92 100644 --- a/action.yml +++ b/action.yml @@ -269,6 +269,8 @@ runs: source "$GITHUB_ACTION_PATH/venv/bin/activate" pip install -r "$GITHUB_ACTION_PATH/requirements.txt" clang-tools -i ${{ inputs.version }} -b + + # Install color output requirements if enabled case "${{ env.CPP_LINTER_COLOR }}" in "true" | "on" | "1") pip install -r "$GITHUB_ACTION_PATH/color-requirements.txt" @@ -313,6 +315,8 @@ runs: Invoke-Expression -Command "$env:GITHUB_ACTION_PATH/venv/Scripts/Activate.ps1" pip install -r "$env:GITHUB_ACTION_PATH/requirements.txt" clang-tools -i ${{ inputs.version }} -b + + # Install color output requirements if enabled $colorEnabled = "true","on","1" if ( $colorEnabled.contains("${{ env.CPP_LINTER_COLOR }}") ) {