From dae1420a5b43cadc9c79a3b5d32ba2e6cb97511a Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 9 Feb 2022 11:41:07 +0100 Subject: [PATCH] ci: add link-checker workflow - merge closed-references and link-checker - add issue number to update --- .github/workflows/closed-references.yml | 29 ------------ .github/workflows/housekeeping.yml | 61 +++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/closed-references.yml create mode 100644 .github/workflows/housekeeping.yml diff --git a/.github/workflows/closed-references.yml b/.github/workflows/closed-references.yml deleted file mode 100644 index 126c6b7cf..000000000 --- a/.github/workflows/closed-references.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Closed Reference Notifier - -on: - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - inputs: - issueLimit: - description: Max. number of issues to create - required: true - default: "5" - -jobs: - find_closed_references: - if: github.repository_owner == 'LibreTime' - name: Find closed references - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-node@v2 - with: - node-version: "16" - - - uses: ory/closed-reference-notifier@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - issueLimit: ${{ github.event.inputs.issueLimit || '5' }} diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml new file mode 100644 index 000000000..ebf2aa94e --- /dev/null +++ b/.github/workflows/housekeeping.yml @@ -0,0 +1,61 @@ +name: Housekeeping + +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + inputs: + issueLimit: + description: Max. number of issues to create + required: true + default: "5" + +jobs: + find_closed_references: + if: github.repository_owner == 'LibreTime' + name: Find closed references + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: "16" + + - uses: ory/closed-reference-notifier@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issueLimit: ${{ github.event.inputs.issueLimit || '5' }} + + find_broken_links: + if: github.repository_owner == 'LibreTime' + name: Find broken links + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Check Links + id: lychee + uses: lycheeverse/lychee-action@v1.2.1 + with: + args: >- + '**/*.md' + --require-https + --exclude-all-private + --exclude-mail + --exclude 'example\.(com|org)' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create Report + if: ${{ steps.lychee.outputs.exit_code != 0 }} + uses: peter-evans/create-issue-from-file@v3 + with: + issue-number: 1589 + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: | + is: documentation + ci