From 2210dcd7a4ed5843b0acc03ccf78049c6262c56f Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 10 Aug 2026 11:36:43 -0500 Subject: [PATCH 1/4] ci: Do not use 'docs' target May not work on older tags. Fixes: 066061d348f1 ("ci: Fix html docs build") Signed-off-by: Lucas De Marchi --- .github/workflows/docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3c063dce..4d533632 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -51,7 +51,9 @@ jobs: - name: Build docs run: | meson setup --native-file build-dev.ini -Ddocs=true build-docs/ - meson compile -C build-docs docs + # XXX: change this to `meson compile -C build-docs docs` once only + # v35+ is supported + ninja -C build-docs libkmod-3-doc - name: Extract docs version shell: bash From 93b28753af0b2e60946c23608232facf0729e621 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 10 Aug 2026 11:46:08 -0500 Subject: [PATCH 2/4] ci: Default steps to run on bash Because there's no point in using a more capped shell in this environment and just shooting us on the foot :-/ /__w/_temp/409e51ac-83d7-43f2-840b-896afb0cb949.sh: 1: [[: not found And that step just passes, making it double bad. Fixes: 44281f373d54 ("ci: Allow to generate docs for past release") Signed-off-by: Lucas De Marchi --- .github/workflows/docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4d533632..2973bbb7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,6 +30,9 @@ jobs: runs-on: ubuntu-26.04 container: image: 'ubuntu:26.04' + defaults: + run: + shell: bash steps: - name: Validate trigger env: From c6307df5e0017973ec2af3bbc7e7bebad339d57d Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 10 Aug 2026 11:28:59 -0500 Subject: [PATCH 3/4] ci: Allow different ref for setup-os When trying to generate doc for an older tag, it may not have the necessary OS setup in place. Always use the latest branch (master or ci-test-docs) for setup-os and then switch to the target one. Fixes: 44281f373d54 ("ci: Allow to generate docs for past release") Signed-off-by: Lucas De Marchi --- .github/workflows/docs.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2973bbb7..e1b6830c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,6 +35,7 @@ jobs: shell: bash steps: - name: Validate trigger + if: ${{ github.event_name == 'workflow_dispatch' }} env: INPUT_TAG: ${{ inputs.tag }} run: | @@ -43,14 +44,33 @@ jobs: exit 1 fi - - name: Checkout + - name: Ref for setup + id: ref_for_setup + run: | + if [[ "${GITHUB_REF}" == refs/heads/ci-test-docs ]]; then + echo ref="ci-test-docs" >> $GITHUB_OUTPUT + else + echo ref="master" >> $GITHUB_OUTPUT + fi + + - name: Checkout for setup-os uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - ref: ${{ inputs.tag }} + ref: ${{ steps.ref_for_setup.outputs.ref }} - name: Setup OS uses: ./.github/actions/setup-os + - name: Checkout target ref for workflow_dispatch + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + if: ${{ github.event_name == 'workflow_dispatch' }} + with: + ref: ${{ inputs.tag }} + + - name: Checkout target ref for normal triggers + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + if: ${{ github.event_name != 'workflow_dispatch' }} + - name: Build docs run: | meson setup --native-file build-dev.ini -Ddocs=true build-docs/ From 514dece4169fc84bf0c3371f29c2b6d598915dd9 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 10 Aug 2026 12:10:36 -0500 Subject: [PATCH 4/4] ci: Only allow publishing docs from master branch or valid tag When running a manual workflow, there's a "publish" boolean input. However we don't want ci-test-docs branch may also be a trigger for updating the CI infra for docs: we don't want to inadvertently also publish the docs when running that pipeline. Fixes: 44281f373d54 ("ci: Allow to generate docs for past release") Signed-off-by: Lucas De Marchi --- .github/workflows/docs.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e1b6830c..f0f0a8d6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -106,6 +106,12 @@ jobs: if [[ "$PUBLISH" == "false" ]]; then echo "publish=false" >> $GITHUB_OUTPUT elif [[ "$PUBLISH" == "true" ]]; then + # this is a manual workflow, only allow to publish if being executed from master branch + # or a tag. We don't want a build from ci-test-docs to end up publishing anything + if [[ "${GITHUB_REF}" != refs/heads/master && "${GITHUB_REF}" != refs/tags/* ]]; then + echo "::error::Can't publish from branch != master or a valid tag (ref=${GITHUB_REF}" + exit 1 + fi echo "publish=true" >> $GITHUB_OUTPUT elif [[ "${GITHUB_REF}" == refs/heads/master || "${GITHUB_REF}" == refs/tags/* ]]; then echo "publish=true" >> $GITHUB_OUTPUT