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:
parent
dd59165b84
commit
8aaa73d411
5 changed files with 52 additions and 25 deletions
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
version: 1
|
||||
update_configs:
|
||||
- package_manager: "docker"
|
||||
|
|
33
.github/workflows/linting.yml
vendored
Normal file
33
.github/workflows/linting.yml
vendored
Normal 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 }}
|
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
|
@ -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
7
.yamllint
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
line-length: disable
|
||||
truthy:
|
||||
check-keys: false
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
# action.yaml
|
||||
name: 'Yamllint Github Action'
|
||||
author: 'karancode <karanthanvi0@gmail.com>'
|
||||
|
|
Loading…
Reference in a new issue