"revert" capture whole run

This commit is contained in:
Ilir Bekteshi 2021-08-16 13:58:18 +02:00
parent 5802e0a5a8
commit b8a648b6e1
2 changed files with 9 additions and 4 deletions

View file

@ -35,9 +35,8 @@ runs:
steps:
- id: yamllint
run: |
LOGFILE=yamllint.log
${{ github.action_path }}/entrypoint.sh | tee -a $LOGFILE
echo "::set-output name=logfile::$(realpath ${LOGFILE})"
export LOGFILE=$(mktemp yamllint-XXXXXX)
${{ github.action_path }}/entrypoint.sh
shell: bash
env:
INPUT_FILE_OR_DIR: ${{ inputs.file_or_dir }}

View file

@ -4,6 +4,10 @@ echo "======================"
echo "= Linting YAML files ="
echo "======================"
if [[ -z "$LOGFILE" ]]; then
LOGFILE=$(mktemp yamllint-XXXXXX)
fi
if [[ -n "$INPUT_CONFIG_FILE" ]]; then
options+=(-c "$INPUT_CONFIG_FILE")
fi
@ -28,4 +32,6 @@ shopt -s globstar
options+=("${INPUT_FILE_OR_DIR:-.}")
shopt -u globstar
yamllint "${options[@]}"
yamllint "${options[@]}" | tee -a "$LOGFILE"
echo "::set-output name=logfile::$(realpath ${LOGFILE})"