TirSystem/git-workflows: Publish wiki / publish-wiki (push) Skipped
Validate workflows / validate (pull_request) Successful in 58s
TirSystem/git-workflows: OpenGrep / opengrep (pull_request) Failing after 6s
TirSystem/git-workflows: Validate / validate (pull_request) Failing after 6s
The scoped workflows fetched their scripts at v2 (v1 for the metadata sync), which has none of the new scripts; the next release is 3.0.0, so they fetch v3. Shorten the run block of publish-wiki-pages.yml to five lines (WF-20) and silence the six OpenGrep ERROR findings that are list-form subprocess calls and the parse of the project's own coverage report, each with its reason. Task: MIL-016#4 Task: MIL-017#4 Task: MIL-018#4 Task: MIL-019#3
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
name: Publish wiki
|
|
|
|
# Scoped workflow: it runs in every repository of an organization, so there is
|
|
# no caller and no input. A repository opts in by having a docs/wiki folder; a
|
|
# repository without one is skipped. It publishes the Markdown pages of
|
|
# docs/wiki to the wiki of the repository, creating and updating pages and
|
|
# keeping the pages that are not in the folder. The script is a file of
|
|
# TirSystem/git-workflows (tools/publish_wiki.py), fetched at v3.
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths:
|
|
- "docs/wiki/**"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish-wiki:
|
|
permissions:
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@v4.2.2
|
|
|
|
- name: Look for the wiki folder
|
|
id: source
|
|
run: |
|
|
found=false
|
|
[ -d docs/wiki ] && found=true
|
|
echo "found=$found" >> "$GITHUB_OUTPUT"
|
|
[ "$found" = true ] || echo "No docs/wiki folder in this repository; nothing to publish."
|
|
|
|
- name: Fetch the shared script
|
|
if: steps.source.outputs.found == 'true'
|
|
uses: actions/checkout@v4.2.2
|
|
with:
|
|
repository: TirSystem/git-workflows
|
|
ref: v3
|
|
path: shared-scripts
|
|
|
|
- name: Publish the pages to the wiki
|
|
if: steps.source.outputs.found == 'true'
|
|
env:
|
|
GITEA_API_URL: ${{ gitea.api_url }}
|
|
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
|
WIKI_CREDENTIALS: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
|
WIKI_DIR: docs/wiki
|
|
WIKI_PRUNE: "false"
|
|
run: python3 shared-scripts/tools/publish_wiki.py
|