Validate workflows / validate (pull_request) Successful in 13s
tools/publish_wiki.py holds the 296 lines that were embedded in publish-wiki.yml, unchanged in behaviour and messages. The scoped workflow now checks out the repository that owns the wiki and TirSystem/github-action at main, and runs the file (42 lines instead of 313). The tests import the file, and a new test asserts that no workflow embeds Python. README and the Home wiki page with its translations no longer mention embedded Python. Verified live from TirSystem-BashScript/RepoFoundry. Task: MIL-004#6
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Publish wiki
|
|
|
|
# Shared through scoped delivery: it runs in every repository of an
|
|
# organization, but writes only where the repository has opted in with
|
|
# wiki/.publish (ADR-0004). TOKEN_FOR_GITEA_WIKI is read from the organization
|
|
# secrets; there is no fallback to the read-only sync token. The script is a
|
|
# file of TirSystem/github-action (tools/publish_wiki.py), fetched with a
|
|
# second checkout so that it is readable, lintable and tested as a file
|
|
# (MIL-004 task 6).
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths:
|
|
- "wiki/**"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: publish-wiki
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
publish-wiki:
|
|
permissions:
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Fetch the shared script
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: TirSystem/github-action
|
|
ref: main
|
|
path: shared-scripts
|
|
|
|
- name: Publish the pages to the wiki
|
|
env:
|
|
GITEA_API_URL: ${{ gitea.api_url }}
|
|
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
|
WIKI_CREDENTIALS: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
|
|
run: python3 shared-scripts/tools/publish_wiki.py
|