mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-27 05:37:15 -05:00
* ci: add yamllint workflow to detect duplicate YAML keys Add a yamllint check for workflow files to catch duplicate keys that YAML parsers silently accept but GitHub Actions rejects on the default branch. Release Note NONE Co-authored-by: Claude <claude@anthropic.com> * ci: address review feedback on yamllint workflow - Add permissions: contents: read (least privilege) - Bump checkout to v6.0.2 with persist-credentials: false - Remove pip install step (yamllint is pre-installed on ubuntu-22.04) Co-authored-by: Claude <claude@anthropic.com> --------- Co-authored-by: Claude <claude@anthropic.com>
29 lines
651 B
YAML
29 lines
651 B
YAML
name: YAML Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/**"
|
|
- ".yamllint"
|
|
|
|
concurrency:
|
|
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.ref) || github.run_id }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
yamllint:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Lint workflow YAML files
|
|
run: yamllint .github/workflows/
|