Skip to content

Commit

Permalink
Merge pull request #1 from Mediaportal-Plugin-Team/yaml_lint
Browse files Browse the repository at this point in the history
Yaml lint
  • Loading branch information
andrewjswan authored Sep 30, 2024
2 parents fdf4660 + 28299cf commit 7227509
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 15 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build / Trailers Plugin
on:
push:
# On Push to Master branch
branches:
branches:
- master
# Ignore all Tags / Release
tags-ignore:
Expand Down Expand Up @@ -70,19 +70,19 @@ jobs:
outputs:
changes: ${{ steps.changes.outputs.xmp }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
xmp:
- '**.xmp2'
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
xmp:
- '**.xmp2'
codeql:
name: CodeQL
if: ${{ needs.changes.outputs.changes == 'true' }}
uses: Mediaportal-Plugin-Team/Mediaportal-Tools/.github/workflows/codeql.yml@master
needs:
needs:
- build
- changes
permissions:
Expand Down Expand Up @@ -223,8 +223,8 @@ jobs:
- name: Delete XML Artifact
uses: geekyeggo/delete-artifact@v5
with:
name: Trailers XML
failOnError: false
name: Trailers XML
failOnError: false

release:
name: Trailers / Release
Expand All @@ -236,9 +236,9 @@ jobs:
contents: write
outputs:
changes: ${{ needs.mpe.outputs.changes }}

runs-on: ubuntu-latest

steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -307,7 +307,7 @@ jobs:
- name: Failure
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

cache-clear:
name: Clear cache
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test / Trailers Plugin
on:
workflow_dispatch:
pull_request:
types:
types:
- opened
- synchronize
- edited
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/workflow_yaml_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Workflow / YAML lint

on:
push:
branches: [main]
paths:
- "**.yaml"
- "**.yml"
pull_request:
paths:
- "**.yaml"
- "**.yml"
workflow_dispatch:

jobs:
yamllint:
name: 🧹 Yaml lint
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out configuration from GitHub
uses: actions/checkout@v4
- name: 🚀 Run yamllint
run: yamllint --strict .
21 changes: 21 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
extends: default

ignore-from-file: .gitignore

rules:
document-start: disable
empty-lines:
level: error
max: 1
max-start: 0
max-end: 1
indentation:
level: error
spaces: 2
indent-sequences: true
check-multi-line-strings: false
line-length: disable
truthy: disable
new-lines: disable
comments-indentation: disable

0 comments on commit 7227509

Please sign in to comment.