diff --git a/.github/workflows/links-watcher-cron.yml b/.github/workflows/links-watcher-cron.yml index 06cd0ede..8814ffd3 100644 --- a/.github/workflows/links-watcher-cron.yml +++ b/.github/workflows/links-watcher-cron.yml @@ -23,10 +23,22 @@ jobs: output: ./lychee/out.md env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Create issue when fail + - name: Find existing issue + id: find_issue + uses: micalevisk/last-issue-action@v2 + if: ${{ steps.lychee.outputs.exit_code }} != 0 + with: + state: open + labels: | + broken link + automated issue + - name: Create or update issue for broken links uses: peter-evans/create-issue-from-file@v4 if: ${{ steps.lychee.outputs.exit_code }} != 0 with: title: Link Checker Report + # If issue number is empty a new issue gets + issue-number: ${{ steps.find_issue.outputs.issue-number }} content-filepath: ./lychee/out.md labels: broken link, automated issue + \ No newline at end of file