openwiki-update.yml: Actions & Schutzmechanismus verbessert
All checks were successful
OpenWiki Update / update (push) Successful in 2m21s
All checks were successful
OpenWiki Update / update (push) Successful in 2m21s
- Actions checkout und setup-node auf neuere Versionen aktualisiert - fetch-depth: 0 für vollständige Git-Historie gesetzt - npm-Installationsbefehl für openwiki vereinfacht (immer neueste Version) - Schritt „Restore protected workflow file“ hinzugefügt, um Überschreiben durch OpenWiki zu verhindern - Kleine Anpassung im PR-Body (Leerzeile entfernt)
This commit is contained in:
31
.github/workflows/openwiki-update.yml
vendored
31
.github/workflows/openwiki-update.yml
vendored
@@ -14,16 +14,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v4
|
||||||
|
with:
|
||||||
|
# Full history so `openwiki code --update` can diff HEAD against the
|
||||||
|
# commit it last documented; a shallow clone hides that commit and the
|
||||||
|
# update runs against an empty change summary.
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version: "22"
|
node-version: "22"
|
||||||
|
|
||||||
- name: Install OpenWiki
|
- name: Install OpenWiki
|
||||||
# mermaid + jsdom are optional; they add high-fidelity validation of Mermaid diagrams. Remove if your wiki has none.
|
# mermaid + jsdom are optional; they add high-fidelity validation of Mermaid diagrams. Remove if your wiki has none.
|
||||||
run: npm install --global openwiki@0.2.3 mermaid@11.16.0 jsdom@29.1.1
|
run: npm install --global openwiki mermaid@11.16.0 jsdom@29.1.1
|
||||||
|
|
||||||
- name: Run OpenWiki
|
- name: Run OpenWiki
|
||||||
run: openwiki code --update --print
|
run: openwiki code --update --print
|
||||||
@@ -32,11 +37,19 @@ jobs:
|
|||||||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
||||||
OPENWIKI_MODEL_ID: gemini-3.6-flash
|
OPENWIKI_MODEL_ID: gemini-3.6-flash
|
||||||
|
|
||||||
|
|
||||||
|
- name: Restore protected workflow file
|
||||||
|
# `openwiki code --update` regenerates this file from its internal
|
||||||
|
# template on every run, which silently drops the guard above (see
|
||||||
|
# https://github.com/langchain-ai/openwiki/issues/423). Until that's
|
||||||
|
# fixed upstream, discard whatever the agent just wrote here so the
|
||||||
|
# guard always survives, regardless of whether the run above
|
||||||
|
# succeeded or failed.
|
||||||
|
if: always()
|
||||||
|
run: git checkout -- .github/workflows/openwiki-update.yml
|
||||||
|
|
||||||
- name: Create OpenWiki update pull request
|
- name: Create OpenWiki update pull request
|
||||||
uses: infinilabs/gitea-pr@v1
|
uses: infinilabs/gitea-pr@v1
|
||||||
env:
|
|
||||||
url: ${{ secrets.GITEA_URL }}
|
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
add-paths: |
|
add-paths: |
|
||||||
openwiki
|
openwiki
|
||||||
@@ -45,8 +58,12 @@ jobs:
|
|||||||
.github/workflows/openwiki-update.yml
|
.github/workflows/openwiki-update.yml
|
||||||
branch: openwiki/update
|
branch: openwiki/update
|
||||||
commit-message: "docs: update OpenWiki"
|
commit-message: "docs: update OpenWiki"
|
||||||
|
url: ${{ secrets.URL }}
|
||||||
|
token: ${{ secrets.TOKEN }}
|
||||||
|
base_branch: master
|
||||||
|
head_branch: openwiki/update
|
||||||
title: "docs: update OpenWiki"
|
title: "docs: update OpenWiki"
|
||||||
body: |
|
body: |
|
||||||
Automated OpenWiki documentation update.
|
Automated OpenWiki documentation update.
|
||||||
|
|
||||||
This PR was generated by the scheduled OpenWiki workflow.
|
This PR was generated by the scheduled OpenWiki workflow.
|
||||||
Reference in New Issue
Block a user