1
0
Fork 0
mirror of https://github.com/karancode/yamllint-github-action.git synced 2024-08-16 10:19:48 +02:00

Add to GitHub Actions workflows Linting ourselves with yamllint (#10)

* Linting ourselves in yamllint

* Add to GitHub Actions workflows Linting ourselves with yamllint
This commit is contained in:
Yudai Takada 2022-12-19 12:00:01 +09:00 committed by GitHub
parent dd59165b84
commit 8aaa73d411
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 25 deletions

View file

@ -1,3 +1,4 @@
---
version: 1
update_configs:
- package_manager: "docker"

33
.github/workflows/linting.yml vendored Normal file
View file

@ -0,0 +1,33 @@
---
name: linting
on:
- pull_request
jobs:
Markdownlint:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- name: Markdown Lint
uses: actionshub/markdownlint@v1.0.0
Dockerfilelint:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- name: Dockerfile Lint
uses: burdzwastaken/hadolint-action@1.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HADOLINT_ACTION_DOCKERFILE_FOLDER: .
Yamllint:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- name: YAML Lint
uses: karancode/yamllint-github-action@master
with:
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,3 +1,4 @@
---
name: "Continuous Integration"
on:
push:
@ -7,30 +8,14 @@ on:
- cron: '22 22 * * 5'
jobs:
lint:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
- name: Markdown Lint
uses: actionshub/markdownlint@v1.0.0
- name: Dockerfile Lint
uses: burdzwastaken/hadolint-action@1.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HADOLINT_ACTION_DOCKERFILE_FOLDER: .
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install bats
run: sudo apt-get -y install bats > /dev/null
- name: Run CI script
run: ./tests/run.bats
- name: Run action
uses: ./
with:

7
.yamllint Normal file
View file

@ -0,0 +1,7 @@
---
extends: default
rules:
line-length: disable
truthy:
check-keys: false

View file

@ -1,3 +1,4 @@
---
# action.yaml
name: 'Yamllint Github Action'
author: 'karancode <karanthanvi0@gmail.com>'