Fix label name in error output message #906
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Run ansible-lint and yamllint for this repo." | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push events and pull_request | |
#push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
# Runs a set of commands using the runners shell | |
- name: "Ansible-lint" | |
# Install ansible-lint(5.0.6) together with yamllint(1.26.0) and run the linting on the whole repo | |
run: | | |
python -m pip install ansible | |
pip install ansible-lint==5.0.6 yamllint==1.26.0 | |
ansible-lint -c ansible-lint.yml *.yml |& tee lint-output.txt | |
if egrep -i '^(warning.*listing.*violation\(s)\)' lint-output.txt; then | |
exit 1 | |
else | |
exit 0 | |
fi | |
- name: "Yaml-lint" | |
run: | | |
yamllint -c yamllint.yml -f parsable --no-warnings . |