Skip to content

Reuse issue with lychee GitHub Action

The default workflow in the lychee-action repository creates a new issue for each run of the link checker.

As an alternative, this workflow demonstrates how to reuse an existing issue instead. It uses the last-issue-action to find the last issue with the label link-checker and then uses the create-issue-from-file action to update the issue with the results of the lychee link checker.

- name: Find Link Checker Issue
uses: micalevisk/last-issue-action@v1
state: open
labels: |
- name: Update Issue
uses: peter-evans/create-issue-from-file@v4
title: Broken links detected in docs 🔗
# Update an existing issue if one was found (issue-number),
# otherwise an empty value creates a new issue:
issue-number: "${{ }}"
content-filepath: ./lychee/
token: ${{secrets.GITHUB_TOKEN}}
labels: |