robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

dependabot[bot]ci: bump actions/checkout in the github-actions group across 1 directory20f44076dc

master
1.2 KiB42 linesraw
1name: lintdoc-urls
2on:
3  schedule:
4    - cron: '22 22 * * 5'
5  workflow_dispatch:
6
7permissions: {}
8
9jobs:
10  check-unreachable-urls:
11    runs-on: ubuntu-latest
12    permissions:
13      issues: write
14    env:
15      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16    steps:
17      - uses: actions/checkout@v7.0.1
18        with:
19          fetch-depth: 0
20          persist-credentials: false
21
22      - name: Set up git config
23        run: |
24          git config --global user.name 'marvim'
25          git config --global user.email 'marvim@users.noreply.github.com'
26
27      - uses: ./.github/actions/setup
28
29      - name: Check for unreachable URLs
30        id: unreachable-urls
31        env:
32          run_url: https://github.com/neovim/neovim/actions/runs/${{ github.run_id }}
33        run: |
34          OUT_FILE=$(mktemp)
35          make lintdocurls 2>&1 | sed -n '/invalid URLs/,/^}/p' > $OUT_FILE
36          if [ -n $OUT_FILE -a -s $OUT_FILE ]; then
37            # wrap output in a code block
38            sed -i -e '1i```' -e '$a```' $OUT_FILE
39            echo "Automatically generated on $(date) from $run_url" >> $OUT_FILE
40            gh issue reopen 36597
41            gh issue edit 36597 --body-file $OUT_FILE
42          fi