Skip to content

Fix action (use explicit step to read report) #21

Fix action (use explicit step to read report)

Fix action (use explicit step to read report) #21

Workflow file for this run

name: Check URL Status
on:
push:
workflow_dispatch:
schedule:
- cron: 0 0 * * 0
env:
LINK_TRACKING_ISSUE_NUMBER: 322
permissions:
issues: write
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Link Checker
id: lychee
uses: lycheeverse/[email protected]
- name: Read Lychee report
if: env.lychee_exit_code != 0
id: readReport
run: echo "::set-output name=FILE_CONTENT::$(cat ./lychee/out.md)"
- name: Update link tracking issue (update invalid links)
if: env.lychee_exit_code != 0
uses: actions-cool/issues-helper@v3
with:
actions: "update-issue"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ env.LINK_TRACKING_ISSUE_NUMBER }}
state: "open"
body: ${{ steps.readReport.outputs.FILE_CONTENT }}
update-mode: "replace"
- name: Update link tracking issue (no invalid links)
if: env.lychee_exit_code == 0
uses: actions-cool/issues-helper@v3
with:
actions: "update-issue"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ env.link_tracking_issue_number }}
state: "closed"
body: "No invalid links found! 🤖"
update-mode: "replace"