Create label.yml #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| 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@5119dcd8011e92182ce8219d9e9efc82f16fddb6 # v8.0.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Super-Linter correction instructions | |
| if: failure() | |
| uses: actions/[email protected] | |
| 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); |