mirror of
https://github.com/hadolint/hadolint-action.git
synced 2025-01-31 11:51:08 +01:00
Add yamllint, fix most yaml errors
This commit is contained in:
parent
d292784f8f
commit
5ca5a12b99
4 changed files with 48 additions and 22 deletions
1
.github/dependabot.yml
vendored
1
.github/dependabot.yml
vendored
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
|
|
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
name: "CI"
|
||||
on:
|
||||
push:
|
||||
|
@ -37,7 +38,9 @@ jobs:
|
|||
build-test:
|
||||
name: Build and Test
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ "lint", "shellcheck" ]
|
||||
needs:
|
||||
- lint
|
||||
- shellcheck
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build Docker image
|
||||
|
@ -55,7 +58,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Run integration test 1
|
||||
- name: Run integration test 1 - good Dockerfile
|
||||
uses: ./
|
||||
with:
|
||||
dockerfile: testdata/Dockerfile
|
||||
|
@ -117,6 +120,15 @@ jobs:
|
|||
# format: sarif
|
||||
# output-file: report.sarif
|
||||
|
||||
- name: Run integration test 9 - run with no Dockerfiles
|
||||
# This should not fail if no Dockerfiles are found in the path
|
||||
# especially if git change deletes Dockerfile
|
||||
uses: testdata/test_empty_dir
|
||||
with:
|
||||
dockerfile: ""
|
||||
failure-threshold: error
|
||||
recursive: true
|
||||
|
||||
release:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
name: Release
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: lint-dockerfile
|
||||
|
@ -5,8 +7,17 @@
|
|||
entry: make lint-dockerfile
|
||||
language: system
|
||||
files: \.yml$
|
||||
|
||||
- id: lint-yaml
|
||||
name: Lint YAML
|
||||
entry: make lint-yaml
|
||||
language: system
|
||||
files: \.yml$
|
||||
- repo: https://github.com/adrienverge/yamllint
|
||||
rev: v1.33.0
|
||||
hooks:
|
||||
- id: yamllint
|
||||
- repo: https://github.com/koalaman/shellcheck-precommit
|
||||
rev: v0.9.0
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
|
|
|
@ -6,3 +6,5 @@ rules:
|
|||
max: 80
|
||||
level: warning
|
||||
document-start: disable
|
||||
truthy:
|
||||
level: warning
|
Loading…
Add table
Reference in a new issue