From 7089dfb3e6dc3eaccf7a47e44e27f53cbdc800d0 Mon Sep 17 00:00:00 2001 From: Ilir Bekteshi Date: Thu, 19 Aug 2021 08:52:08 +0200 Subject: [PATCH] Upd readme --- .github/workflows/lint.yml | 10 +++++++++- README.md | 1 + action.yml | 2 +- entrypoint.sh | 4 +++- 4 files changed, 14 insertions(+), 3 deletions(-) mode change 100644 => 100755 entrypoint.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9eeae38..9ea883d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,6 +6,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Get yamllint version + run: yamllint --version + - id: lint-with-config name: lint with config uses: ./ @@ -31,11 +34,12 @@ jobs: - id: lint-all-continue name: lint all (continue on error) - continue-on-error: true + # continue-on-error: true uses: ./ with: file_or_dir: test strict: true + format: standard - id: default-lint-all name: default lint all (continue on error) @@ -43,7 +47,11 @@ jobs: uses: ./ - id: print-output + if: always() name: Print output run: | echo ${{ steps.lint-with-config.outputs.logfile }} cat ${{ steps.lint-with-config.outputs.logfile }} + + echo ${{ steps.lint-all-continue.outputs.logfile }} + cat ${{ steps.lint-all-continue.outputs.logfile }} diff --git a/README.md b/README.md index 3c84f5c..509a887 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,7 @@ jobs: - run: echo ${{ steps.yaml-lint.outputs.logfile }} - uses: actions/upload-artifact@v2 + if: always() with: name: yamllint-logfile path: ${{ steps.yaml-lint.outputs.logfile }} diff --git a/action.yml b/action.yml index d1d1514..c894ff2 100644 --- a/action.yml +++ b/action.yml @@ -35,7 +35,7 @@ runs: steps: - id: yamllint run: | - export LOGFILE=$(mktemp yamllint-XXXXXX) + # export LOGFILE=$(mktemp yamllint-XXXXXX) ${{ github.action_path }}/entrypoint.sh shell: bash env: diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 index 1ab7fc7..4cbba51 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,5 @@ #!/bin/bash -l +set -o pipefail echo "======================" echo "= Linting YAML files =" @@ -29,7 +30,8 @@ fi # Enable globstar so ** globs recursively shopt -s globstar -yamllint "${options[@]}" ${INPUT_FILE_OR_DIR:-.} | tee -a "$LOGFILE" +yamllint "${options[@]}" ${INPUT_FILE_OR_DIR:-.} +# | tee -a "$LOGFILE" shopt -u globstar