actions: CASCADE_DOCS_FORCE_VERSION can force generating a version

This commit is contained in:
Earl Warren 2024-01-13 18:19:56 +01:00
parent dcc61603a2
commit 6236202f09
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 5 additions and 1 deletions

View file

@ -14,7 +14,7 @@ fi
cd $docs/docs/user
if ! test -f actions-contexts/version.txt || test "$VERSION" != $(cat actions-contexts/version.txt) ; then
if test "$FORCE_VERSION" = "$VERSION" || ! test -f actions-contexts/version.txt || test "$VERSION" != $(cat actions-contexts/version.txt) ; then
rm -fr actions-contexts
mkdir actions-contexts
echo "$VERSION" > actions-contexts/version.txt

View file

@ -8,6 +8,9 @@
# forgejo-cascading-pr (https://codeberg.org/forgejo-cascading-pr)
# secrets.CASCADE_DOCS_DESTINATION_TOKEN
# https://codeberg.org/forgejo-cascading-pr scope write:issue, write:repository, read:user
# vars.CASCADE_DOCS_FORCE_VERSION
# replace the generated documentation for a given version even if it has already
# been generated (e.g. v1.22.0-test)
#
on:
@ -75,4 +78,5 @@ jobs:
prefix: ${{ env.GITHUB_REPOSITORY }}-${{ matrix.info.version }}
update: .forgejo/cascading-docs
env:
FORCE_VERSION: "${{ vars.CASCADE_DOCS_FORCE_VERSION }}"
VERSION: "${{ steps.run.outputs.full_version }}"