mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-18 11:10:04 +00:00
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
---
|
|
# This action is centrally managed in https://github.com/<organization>/.github/
|
|
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
|
# the above-mentioned repo.
|
|
|
|
name: yaml lint
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master, nightly]
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
yaml-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Find additional files
|
|
id: find-files
|
|
run: |
|
|
# space separated list of files
|
|
FILES=.clang-format
|
|
|
|
# empty placeholder
|
|
FOUND=""
|
|
|
|
for FILE in ${FILES}; do
|
|
if [ -f "$FILE" ]
|
|
then
|
|
FOUND="$FOUND $FILE"
|
|
fi
|
|
done
|
|
|
|
echo "found=${FOUND}" >> $GITHUB_OUTPUT
|
|
|
|
- name: yaml lint
|
|
id: yaml-lint
|
|
uses: ibiqlik/action-yamllint@v3
|
|
with:
|
|
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
|
|
config_data: |
|
|
extends: default
|
|
rules:
|
|
comments:
|
|
level: error
|
|
line-length:
|
|
max: 120
|
|
truthy:
|
|
# GitHub uses "on" for workflow event triggers
|
|
# .clang-format file has options of "Yes" "No" that will be caught by this, so changed to "warning"
|
|
allowed-values: ['true', 'false', 'on']
|
|
check-keys: true
|
|
level: warning
|
|
file_or_dir: . ${{ steps.find-files.outputs.found }}
|
|
|
|
- name: Log
|
|
if: failure()
|
|
run: |
|
|
cat "${{ steps.yaml-lint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY
|