diff --git a/action.yml b/action.yml index 7c400e9..3173aa8 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,10 @@ runs: using: 'composite' steps: - id: yamllint - run: ${{ github.action_path }}/entrypoint.sh + run: | + LOGFILE=yamllint.log + ${{ github.action_path }}/entrypoint.sh | tee -a $LOGFILE + echo "::set-output name=logfile::$(realpath ${LOGFILE})" shell: bash env: INPUT_FILE_OR_DIR: ${{ inputs.file_or_dir }} diff --git a/entrypoint.sh b/entrypoint.sh index 0eade4a..7ae3616 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,8 +4,6 @@ echo "======================" echo "= Linting YAML files =" echo "======================" -LOGFILE=yamllint.log - if [[ -n "$INPUT_CONFIG_FILE" ]]; then options+=(-c "$INPUT_CONFIG_FILE") fi @@ -30,6 +28,4 @@ shopt -s globstar options+=("${INPUT_FILE_OR_DIR:-.}") shopt -u globstar -yamllint "${options[@]}" | tee -a $LOGFILE - -echo "::set-output name=logfile::$(realpath ${LOGFILE})" +yamllint "${options[@]}"