Skip to content

Generate docs for runtime images #1

Generate docs for runtime images

Generate docs for runtime images #1

# Copyright 2026 FlagOS Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Generate docs for runtime images
# Post-build: generate runtime image description markdown (single source for the
# docs site, the in-repo runtime/<name>.md file, and the Harbor repository
# description), then commit + upload.
#
# Triggered manually when the final runtime image (v2, with flag_gems) has been
# built and pushed. Not triggered by workflow_run because runtime:v2 is rebuilt
# repeatedly during the FlagGems testing phase — automatic triggering would
# produce noisy empty PRs.
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
authorize:
# Only accounts listed in .github/builders.txt may trigger this workflow
# manually; see .github/actions/check-trigger-author for the check.
# actions/checkout is required: local composite actions are resolved from
# the workspace, so the repo must exist before the action step runs.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/check-trigger-author
finalize:
needs: authorize
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install PyYAML
run: python3 -m pip install --user pyyaml
- name: Generate data and descriptions
env:
VERSIONS_DIR: ${{ github.workspace }}/versions
run: |
python3 docs/gen_data.py
mkdir -p versions
python3 docs/gen_descriptions.py
- name: Finalize (commit + PR)
env:
GH_TOKEN: ${{ github.token }}
GITHUB_REF_NAME: ${{ github.ref_name }}
run: |
git config user.name flagos-ci
git config user.email noreply@flagos.net
LABEL=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo latest)
python3 scripts/finalize_descriptions.py \
--mode runtime \
--done true \
--count 14 \
--label "$LABEL" \
--verify-ok 0 --verify-fail 0 --verify-skip 0