-
Notifications
You must be signed in to change notification settings - Fork 8.2k
51 lines (48 loc) · 1.94 KB
/
markdownLink.yml
File metadata and controls
51 lines (48 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
on:
pull_request:
branches:
- master
name: Check modified markdown files
permissions:
contents: read
jobs:
markdown-link-check:
runs-on: ubuntu-latest
if: github.repository_owner == 'PowerShell'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368 # v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
check-modified-files-only: 'yes'
config-file: .github/workflows/markdown-link/config.json
markdown-lint:
permissions:
contents: read
packages: read
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
- name: Load super-linter configuration
# Use grep inverse matching to exclude eventual comments in the .env file
# because the GitHub Actions command to set environment variables doesn't
# support comments.
# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
run: grep -v '^#' tools/super-linter/config/super-linter.env >> "$GITHUB_ENV"
- name: Lint Markdown
uses: super-linter/super-linter@a8150b40c89574adb5f68bf9502b890a236a06b3 # v5.7.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Super-Linter correction instructions
if: failure()
uses: actions/github-script@v7.0.1
with:
script: |
const message = "Super-Linter found issues in the changed files. Please check the logs for details. You can run the linter locally using the command: `./tools/super-lister/super-lister.ps1`.";
core.setFailed(message);