From 5f13c4b3d52f7347c6c1fa39dcbf1eb49ccc743e Mon Sep 17 00:00:00 2001 From: Brian Scholer <1260690+briantist@users.noreply.github.com> Date: Sun, 1 May 2022 11:35:14 -0400 Subject: [PATCH 1/2] allow push workflow to choose ref --- .github/workflows/_shared-docs-build-push.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/_shared-docs-build-push.yml b/.github/workflows/_shared-docs-build-push.yml index 654083e..849c135 100644 --- a/.github/workflows/_shared-docs-build-push.yml +++ b/.github/workflows/_shared-docs-build-push.yml @@ -22,6 +22,12 @@ on: required: false type: string default: stable-2.13 + build-ref: + description: | + The ref from this repository to check out and build. + The default is the default of the actions/checkout action. + required: false + type: string init-dest-dir: description: A directory relative to the checkout where the init process has already been run. required: false @@ -124,6 +130,7 @@ jobs: uses: actions/checkout@v3 with: path: ${{ steps.vars.outputs.checkout-path }} + ref: ${{ inputs.build-ref }} - name: Initialize the build environment id: init From b31941c9943055cea3bef506ff9ed014f09960fb Mon Sep 17 00:00:00 2001 From: Brian Scholer <1260690+briantist@users.noreply.github.com> Date: Sun, 1 May 2022 11:45:22 -0400 Subject: [PATCH 2/2] add option to not upload artifact --- .github/workflows/_shared-docs-build-push.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/_shared-docs-build-push.yml b/.github/workflows/_shared-docs-build-push.yml index 849c135..81ac724 100644 --- a/.github/workflows/_shared-docs-build-push.yml +++ b/.github/workflows/_shared-docs-build-push.yml @@ -48,6 +48,11 @@ on: If not supplied, the latest version from PyPI is used. If supplied, must be a git ref from the antsibull-docs repository. required: false type: string + artifact-upload: + description: Whether or not to upload the build as an artifact. + type: boolean + required: false + default: true artifact-name: description: The name of the artifact to upload. required: false @@ -150,3 +155,4 @@ jobs: build-script: ${{ steps.init.outputs.build-script }} build-html: ${{ steps.init.outputs.build-html }} artifact-name: ${{ inputs.artifact-name }} + artifact-upload: ${{ inputs.artifact-upload }}