From da285806b36fe92c122a0f027491933dc0919371 Mon Sep 17 00:00:00 2001 From: Harvester57 Date: Sun, 31 Jul 2022 19:38:43 +0200 Subject: [PATCH 1/5] Add CI action to check for broken links --- .github/workflows/links-fail-fast.yml | 18 ++++++++++++++++++ .github/workflows/links.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/links-fail-fast.yml create mode 100644 .github/workflows/links.yml diff --git a/.github/workflows/links-fail-fast.yml b/.github/workflows/links-fail-fast.yml new file mode 100644 index 0000000..5221272 --- /dev/null +++ b/.github/workflows/links-fail-fast.yml @@ -0,0 +1,18 @@ +name: Links (Fail Fast) + +on: + push: + pull_request: + +jobs: + linkChecker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Link Checker + uses: lycheeverse/lychee-action@v1.5.0 + with: + fail: true + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 0000000..3e1fc81 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,27 @@ +name: Links + +on: + repository_dispatch: + workflow_dispatch: + schedule: + - cron: "00 18 * * *" + +jobs: + linkChecker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1.5.0 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Create Issue From File + if: steps.lychee.outputs.exit_code != 0 + uses: peter-evans/create-issue-from-file@v3 + with: + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: report, automated issue \ No newline at end of file From d6a38b9c88b340e5f5ee95ddee05c23ebf650569 Mon Sep 17 00:00:00 2001 From: Harvester57 Date: Sun, 31 Jul 2022 19:39:02 +0200 Subject: [PATCH 2/5] Add Dependabot action to maintain other CI actions --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0d67809 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: ".github/workflows" + schedule: + interval: "daily" \ No newline at end of file From f2a6f4aaf42fe27ddad9f223df32078919fe8b40 Mon Sep 17 00:00:00 2001 From: Harvester57 Date: Sun, 31 Jul 2022 19:47:44 +0200 Subject: [PATCH 3/5] Trigger the CI Links workflow on pushes --- .github/workflows/links.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 3e1fc81..797f39b 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -1,6 +1,7 @@ name: Links on: + push: repository_dispatch: workflow_dispatch: schedule: From 12a33b1c218d9930d3b4c8b1137f2082a83bb24a Mon Sep 17 00:00:00 2001 From: Harvester57 Date: Sun, 31 Jul 2022 19:51:35 +0200 Subject: [PATCH 4/5] Revert push on non fail-fast CI action --- .github/workflows/links.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 797f39b..3e1fc81 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -1,7 +1,6 @@ name: Links on: - push: repository_dispatch: workflow_dispatch: schedule: From 9a2f5661dc7a21f83ccbc035b01658a01b7cf039 Mon Sep 17 00:00:00 2001 From: Harvester57 Date: Sun, 31 Jul 2022 20:16:14 +0200 Subject: [PATCH 5/5] Update "create issue" Action to v4 --- .github/workflows/links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 3e1fc81..a216767 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -20,7 +20,7 @@ jobs: - name: Create Issue From File if: steps.lychee.outputs.exit_code != 0 - uses: peter-evans/create-issue-from-file@v3 + uses: peter-evans/create-issue-from-file@v4 with: title: Link Checker Report content-filepath: ./lychee/out.md