mirror of
https://github.com/ibiqlik/action-yamllint.git
synced 2024-11-23 18:19:33 +01:00
Upd readme
This commit is contained in:
parent
30f9249db0
commit
7089dfb3e6
4 changed files with 14 additions and 3 deletions
10
.github/workflows/lint.yml
vendored
10
.github/workflows/lint.yml
vendored
|
@ -6,6 +6,9 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get yamllint version
|
||||||
|
run: yamllint --version
|
||||||
|
|
||||||
- id: lint-with-config
|
- id: lint-with-config
|
||||||
name: lint with config
|
name: lint with config
|
||||||
uses: ./
|
uses: ./
|
||||||
|
@ -31,11 +34,12 @@ jobs:
|
||||||
|
|
||||||
- id: lint-all-continue
|
- id: lint-all-continue
|
||||||
name: lint all (continue on error)
|
name: lint all (continue on error)
|
||||||
continue-on-error: true
|
# continue-on-error: true
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
file_or_dir: test
|
file_or_dir: test
|
||||||
strict: true
|
strict: true
|
||||||
|
format: standard
|
||||||
|
|
||||||
- id: default-lint-all
|
- id: default-lint-all
|
||||||
name: default lint all (continue on error)
|
name: default lint all (continue on error)
|
||||||
|
@ -43,7 +47,11 @@ jobs:
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
||||||
- id: print-output
|
- id: print-output
|
||||||
|
if: always()
|
||||||
name: Print output
|
name: Print output
|
||||||
run: |
|
run: |
|
||||||
echo ${{ steps.lint-with-config.outputs.logfile }}
|
echo ${{ steps.lint-with-config.outputs.logfile }}
|
||||||
cat ${{ 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 }}
|
||||||
|
|
|
@ -99,6 +99,7 @@ jobs:
|
||||||
- run: echo ${{ steps.yaml-lint.outputs.logfile }}
|
- run: echo ${{ steps.yaml-lint.outputs.logfile }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: yamllint-logfile
|
name: yamllint-logfile
|
||||||
path: ${{ steps.yaml-lint.outputs.logfile }}
|
path: ${{ steps.yaml-lint.outputs.logfile }}
|
||||||
|
|
|
@ -35,7 +35,7 @@ runs:
|
||||||
steps:
|
steps:
|
||||||
- id: yamllint
|
- id: yamllint
|
||||||
run: |
|
run: |
|
||||||
export LOGFILE=$(mktemp yamllint-XXXXXX)
|
# export LOGFILE=$(mktemp yamllint-XXXXXX)
|
||||||
${{ github.action_path }}/entrypoint.sh
|
${{ github.action_path }}/entrypoint.sh
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
|
4
entrypoint.sh
Normal file → Executable file
4
entrypoint.sh
Normal file → Executable file
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash -l
|
#!/bin/bash -l
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
echo "======================"
|
echo "======================"
|
||||||
echo "= Linting YAML files ="
|
echo "= Linting YAML files ="
|
||||||
|
@ -29,7 +30,8 @@ fi
|
||||||
# Enable globstar so ** globs recursively
|
# Enable globstar so ** globs recursively
|
||||||
shopt -s globstar
|
shopt -s globstar
|
||||||
|
|
||||||
yamllint "${options[@]}" ${INPUT_FILE_OR_DIR:-.} | tee -a "$LOGFILE"
|
yamllint "${options[@]}" ${INPUT_FILE_OR_DIR:-.}
|
||||||
|
# | tee -a "$LOGFILE"
|
||||||
|
|
||||||
shopt -u globstar
|
shopt -u globstar
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue