robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
20f44076dc
master
1name : lintdoc-urls 2on : 3schedule : 4- cron : '22 22 * * 5' 5workflow_dispatch : 6 7permissions : {} 8 9jobs : 10check-unreachable-urls : 11runs-on : ubuntu-latest 12permissions : 13issues : write 14env : 15GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} 16steps : 17- uses : actions/checkout@v7.0.1 18with : 19fetch-depth : 0 20persist-credentials : false 21 22- name : Set up git config 23run : | 24git config --global user.name 'marvim' 25git config --global user.email 'marvim@users.noreply.github.com' 26 27- uses : ./.github/actions/setup 28 29- name : Check for unreachable URLs 30id : unreachable-urls 31env : 32run_url : https://github.com/neovim/neovim/actions/runs/${{ github.run_id }} 33run : | 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