name: Links

on:
  workflow_dispatch:
  schedule:
    - cron: "0 0 * * *" # Every day at midnight
  pull_request:
    paths:
      - ".github/workflows/links.yml"

permissions:
  contents: read

jobs:
  check:
    runs-on: ubuntu-latest
    if: github.repository == 'containerd/containerd'
    name: lychee
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

      - uses: lycheeverse/lychee-action@7cd0af4c74a61395d455af97419279d86aafaede # v2.0.2
        with:
          # Fail action on broken links
          fail: true
          args: --exclude-path vendor --exclude-path releases --timeout 30 --no-progress './**/*.md'
          format: markdown
          # Write GitHub job summary
          jobSummary: true
