From 74e366ae4e1f0d02fdabe0f34cb6e8c10233a96d Mon Sep 17 00:00:00 2001 From: Bill Little Date: Thu, 20 Nov 2025 21:53:35 +0000 Subject: [PATCH 1/2] fix ci-linkcheck --- templates/github/workflows/ci-linkchecks.yml | 26 ++++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/templates/github/workflows/ci-linkchecks.yml b/templates/github/workflows/ci-linkchecks.yml index 02bb7dd..e009572 100644 --- a/templates/github/workflows/ci-linkchecks.yml +++ b/templates/github/workflows/ci-linkchecks.yml @@ -5,13 +5,21 @@ on: schedule: - cron: "00 06 * * *" # TEMPLATE EXAMPLE: schedule = every day at 6am +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: linkChecker: runs-on: ubuntu-latest permissions: issues: write # required for peter-evans/create-issue-from-file + steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false - name: Link Checker id: lychee @@ -20,17 +28,25 @@ jobs: token: ${{secrets.GITHUB_TOKEN}} fail: false # TEMPLATE EXAMPLE: check files = RST and INC in docs, PY in source - args: "--verbose --max-concurrency 1 './docs/**/*.rst' './docs/**/*.inc' './lib/**/*.py'" + args: | + --verbose + --max-concurrency 1 + './docs/**/*.rst' + './docs/**/*.inc' + './lib/**/*.py' - name: Create Issue From File - if: steps.lychee.outputs.exit_code != 0 + if: ${{ fromJSON(steps.lychee.outputs.exit_code) != 0 }} uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd with: title: Link Checker Report content-filepath: ./lychee/out.md - labels: "Bot, Type: Documentation, Type: Bug" # TEMPLATE EXAMPLE = failure Issue labels + labels: | + Bot + Type: Documentation + Type: Bug - name: Fail Workflow On Link Errors - if: steps.lychee.outputs.exit_code != 0 + if: ${{ fromJSON(steps.lychee.outputs.exit_code) != 0 }} run: - exit {{ steps.lychee.outputs.exit_code }} + exit ${{ fromJSON(steps.lychee.outputs.exit_code) }} From f696e9f0b636222763b1635a307be1f030500bff Mon Sep 17 00:00:00 2001 From: Bill Little Date: Thu, 20 Nov 2025 23:05:39 +0000 Subject: [PATCH 2/2] review actions --- templates/github/workflows/ci-linkchecks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/github/workflows/ci-linkchecks.yml b/templates/github/workflows/ci-linkchecks.yml index e009572..726350e 100644 --- a/templates/github/workflows/ci-linkchecks.yml +++ b/templates/github/workflows/ci-linkchecks.yml @@ -41,6 +41,7 @@ jobs: with: title: Link Checker Report content-filepath: ./lychee/out.md + # TEMPLATE EXAMPLE = failure Issue labels labels: | Bot Type: Documentation