mirror of
https://github.com/hassio-addons/repository-edge.git
synced 2025-05-04 19:21:26 +00:00
Replace GitLab CI with GitHub Actions
This commit is contained in:
parent
bd232afe61
commit
66ce025c3c
2 changed files with 33 additions and 37 deletions
33
.github/workflows/lint.yaml
vendored
Normal file
33
.github/workflows/lint.yaml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
name: Lint
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- synchronize
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
json:
|
||||||
|
name: JSON Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: ⤵️ Check out code from GitHub
|
||||||
|
uses: actions/checkout@v2.3.4
|
||||||
|
- name: 🚀 Run JQ
|
||||||
|
run: |
|
||||||
|
shopt -s globstar
|
||||||
|
cat **/*.json | jq '.'
|
||||||
|
|
||||||
|
yamllint:
|
||||||
|
name: YAMLLint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: ⤵️ Check out code from GitHub
|
||||||
|
uses: actions/checkout@v2.3.4
|
||||||
|
- name: 🚀 Run YAMLLint
|
||||||
|
uses: frenck/action-yamllint@v1.0.2
|
|
@ -1,37 +0,0 @@
|
||||||
---
|
|
||||||
image: docker:stable
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- linting
|
|
||||||
|
|
||||||
.linting: &linting
|
|
||||||
stage: linting
|
|
||||||
tags:
|
|
||||||
- linting
|
|
||||||
|
|
||||||
yamllint:
|
|
||||||
<<: *linting
|
|
||||||
image: sdesbure/yamllint
|
|
||||||
before_script:
|
|
||||||
- yamllint --version
|
|
||||||
script:
|
|
||||||
- yamllint .
|
|
||||||
|
|
||||||
jsonlint:
|
|
||||||
<<: *linting
|
|
||||||
image: sahsu/docker-jsonlint
|
|
||||||
before_script:
|
|
||||||
- jsonlint --version || true
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
for file in $(find . -type f -name "*.json"); do
|
|
||||||
if ! jsonlint -q $file; then
|
|
||||||
export FAILED=1
|
|
||||||
else
|
|
||||||
echo "$file OK"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ "${FAILED}" = "1" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue