mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
50 lines
1.9 KiB
YAML
50 lines
1.9 KiB
YAML
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
name: Check modified markdown files
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
markdown-link-check:
|
|
runs-on: ubuntu-latest
|
|
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);
|