Skip to content

Commit

Permalink
Add yamllint, fix most yaml errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nvtkaszpir committed Jan 11, 2024
1 parent d292784 commit 5ca5a12
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 22 deletions.
17 changes: 9 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: "CI"
on:
push:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
35 changes: 23 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
- repo: local
hooks:
- id: lint-dockerfile
name: Lint Dockerfile
entry: make lint-dockerfile
language: system
files: \.yml$
- id: lint-yaml
name: Lint YAML
entry: make lint-yaml
language: system
files: \.yml$
---
repos:
- repo: local
hooks:
- id: lint-dockerfile
name: Lint Dockerfile
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
2 changes: 2 additions & 0 deletions .yamllint → .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ rules:
max: 80
level: warning
document-start: disable
truthy:
level: warning

0 comments on commit 5ca5a12

Please sign in to comment.