From 8f294f9d63f85e5fcc3ddd7e0e950738110e20b4 Mon Sep 17 00:00:00 2001 From: shmileee Date: Sun, 15 Nov 2026 20:30:05 +0100 Subject: [PATCH 1/3] fix: keep readme-weaver partials out of the scan and the auto-commit Check out devops-roast/.github into a hidden .readme-weaver-partials directory and add it to .git/info/exclude. Previously it was checked out into ./partials, so readme-weaver also processed partials/README.md (whose include path does not resolve against the base directory) and crashed, and git-auto-commit-action would have committed the checkout as an embedded repository. --- .github/workflows/readme-weaver.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/readme-weaver.yaml b/.github/workflows/readme-weaver.yaml index 513a73a..4c5645c 100644 --- a/.github/workflows/readme-weaver.yaml +++ b/.github/workflows/readme-weaver.yaml @@ -54,17 +54,27 @@ jobs: run: | git config --global --add safe.directory "$(pwd)" - name: checkout common markdown - uses: actions/checkout@v5 + # The partials must live inside the workspace so the readme-weaver + # container can read them. A hidden directory keeps them out of + # readme-weaver's `**/*.md` scan; otherwise the include directives in + # the `.github` repository's own README are processed and fail to + # resolve. + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 with: token: ${{ secrets.GITHUB_TOKEN }} repository: devops-roast/.github - path: partials + path: .readme-weaver-partials ref: main + - name: exclude common markdown from git + # Without this, the auto-commit step would add the partials checkout + # to the calling repository as an embedded git repository (gitlink). + run: | + echo "/.readme-weaver-partials/" >> .git/info/exclude - name: run readme weaver uses: devops-roast/readme-weaver@v0.1.1 env: LOG_LEVEL: DEBUG - README_WEAVER_BASE: ./partials/common-markdown + README_WEAVER_BASE: ./.readme-weaver-partials/common-markdown - name: commit changes back uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1 id: auto_commit_action From a220d8ca04596c4d1ced0ace6b788fbd6d00da5b Mon Sep 17 00:00:00 2001 From: shmileee Date: Sun, 15 Nov 2026 20:37:51 +0100 Subject: [PATCH 2/3] ci: [temp] use readme-weaver fix branch --- .github/workflows/readme-weaver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/readme-weaver.yaml b/.github/workflows/readme-weaver.yaml index 4c5645c..d196d51 100644 --- a/.github/workflows/readme-weaver.yaml +++ b/.github/workflows/readme-weaver.yaml @@ -71,7 +71,7 @@ jobs: run: | echo "/.readme-weaver-partials/" >> .git/info/exclude - name: run readme weaver - uses: devops-roast/readme-weaver@v0.1.1 + uses: devops-roast/readme-weaver@fix/mdformat-stable-output-and-code-fences env: LOG_LEVEL: DEBUG README_WEAVER_BASE: ./.readme-weaver-partials/common-markdown From 9643f977873055b8c30806de3e8088380fe94614 Mon Sep 17 00:00:00 2001 From: shmileee Date: Sun, 15 Nov 2026 20:45:15 +0100 Subject: [PATCH 3/3] fix: use readme-weaver v0.1.2 v0.1.2 produces mdformat-stable output, so readme-weaver and pre-commit no longer rewrite each other's auto-commits. --- .github/workflows/readme-weaver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/readme-weaver.yaml b/.github/workflows/readme-weaver.yaml index d196d51..03c642b 100644 --- a/.github/workflows/readme-weaver.yaml +++ b/.github/workflows/readme-weaver.yaml @@ -71,7 +71,7 @@ jobs: run: | echo "/.readme-weaver-partials/" >> .git/info/exclude - name: run readme weaver - uses: devops-roast/readme-weaver@fix/mdformat-stable-output-and-code-fences + uses: devops-roast/readme-weaver@v0.1.2 env: LOG_LEVEL: DEBUG README_WEAVER_BASE: ./.readme-weaver-partials/common-markdown