Update links.yml

This commit is contained in:
Jake Henning 2021-12-28 16:35:44 +02:00 committed by GitHub
parent 4003bff771
commit 0f1a670a73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,20 +24,21 @@ jobs:
- name: Find all markdown files - name: Find all markdown files
id: find_files id: find_files
run: | run: echo "MD_FILES=$(find . -name '*.md' -type f | sed 's|^./||' | tr '\n' ' ')" >> $GITHUB_ENV
echo "::set-output name=files::$(find . -name '*.md' -type f | sed 's|^./||' | tr '\n' ' ')"
- name: Link Checker - name: Link Checker
id: lychee id: lychee
uses: lycheeverse/lychee-action@v1.2.0 uses: lycheeverse/lychee-action@v1.2.0
with: with:
args: --verbose --no-progress ${{steps.find_files.outputs.files}} format: json
output: /tmp/links.json
args: --verbose --no-progress $MD_FILES
env: env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Read Markdown - name: Read Markdown
if: ${{ steps.lychee.outputs.exit_code != 0 }} if: ${{ steps.lychee.outputs.exit_code != 0 }}
run: echo "REPORT=$(jq -Rs '.' ./lychee/out.md)" >> $GITHUB_ENV run: echo "REPORT=$(echo jq -Rs '```.```' /tmp/links.json)" >> $GITHUB_ENV
- name: Slack Notification - name: Slack Notification
if: ${{ steps.lychee.outputs.exit_code != 0 }} if: ${{ steps.lychee.outputs.exit_code != 0 }}