зеркало из https://github.com/Azure/ALZ-Bicep.git
69 строки
2.2 KiB
YAML
69 строки
2.2 KiB
YAML
---
|
||
name: Code Review - Linting & Link Checks
|
||
|
||
on:
|
||
pull_request:
|
||
branches:
|
||
- main
|
||
workflow_dispatch: {}
|
||
|
||
permissions:
|
||
contents: read
|
||
|
||
jobs:
|
||
lint:
|
||
permissions:
|
||
contents: read # for actions/checkout to fetch code
|
||
statuses: write # for github/super-linter to mark status of each linter run
|
||
name: Lint code base
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: Harden Runner
|
||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
|
||
with:
|
||
egress-policy: audit
|
||
|
||
- name: Checkout code
|
||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
- name: Run github/super-linter
|
||
uses: github/super-linter@b807e99ddd37e444d189cfd2c2ca1274d8ae8ef1 # v7
|
||
env:
|
||
# Lint all code - disabled in as part of #262
|
||
VALIDATE_ALL_CODEBASE: false
|
||
# Need to define main branch as default is set to master in super-linter
|
||
DEFAULT_BRANCH: main
|
||
# Enable setting the status of each individual linter run in the Checks section of a pull request
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
# The following linter types will be enabled:
|
||
VALIDATE_JSON: true
|
||
VALIDATE_MARKDOWN: true
|
||
VALIDATE_POWERSHELL: true
|
||
VALIDATE_YAML: true
|
||
VALIDATE_EDITORCONFIG: true
|
||
# Added exclusion in workflow for generated documentation. PR #304
|
||
FILTER_REGEX_EXCLUDE: (.*generateddocs/.*.bicep.md$|.*.tests.ps1)
|
||
|
||
markdown-link-check:
|
||
name: Markdown Link Check
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: Harden Runner
|
||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
|
||
with:
|
||
egress-policy: audit
|
||
|
||
- name: Checkout code
|
||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # master
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
- name: Check links in markdown files
|
||
uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # 1.0.15
|
||
with:
|
||
config-file: ".github/actions-config/mlc_config.json"
|
||
use-verbose-mode: "yes"
|
||
use-quiet-mode: "yes"
|