* Add permission matrices to all Actions workflows Also cleanup a few token references * Add actions:read permissions for CodeQL * Add prs:read permissions for unit test workflow
35 lines
1017 B
YAML
35 lines
1017 B
YAML
name: Lint workflows
|
|
|
|
# **What it does**: This lints our workflow files.
|
|
# **Why we have it**: We want some level of consistency in our workflow files.
|
|
# **Who does it impact**: Docs engineering.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.github/workflows/*.yml'
|
|
- '.github/workflows/*.yaml'
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/*.yml'
|
|
- '.github/workflows/*.yaml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
if: ${{ github.repository == 'github/docs-internal' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
|
|
|
- name: Run linter
|
|
uses: cschleiden/actions-linter@caffd707beda4fc6083926a3dff48444bc7c24aa
|
|
with:
|
|
workflows: '[".github/workflows/*.yml", ".github/workflows/*.yaml", "!.github/workflows/remove-from-fr-board.yaml", "!.github/workflows/staging-deploy-pr.yml", "!.github/workflows/triage-issue-comments.yml"]'
|