Skip to content

Commit 8979a3d

Browse files
authored
workflow shared-docs-build-push: add artifact-upload and build-ref options (#45)
* allow push workflow to choose ref * add option to not upload artifact
1 parent 1d22253 commit 8979a3d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/_shared-docs-build-push.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ on:
2222
required: false
2323
type: string
2424
default: stable-2.13
25+
build-ref:
26+
description: |
27+
The ref from this repository to check out and build.
28+
The default is the default of the actions/checkout action.
29+
required: false
30+
type: string
2531
init-dest-dir:
2632
description: A directory relative to the checkout where the init process has already been run.
2733
required: false
@@ -42,6 +48,11 @@ on:
4248
If not supplied, the latest version from PyPI is used. If supplied, must be a git ref from the antsibull-docs repository.
4349
required: false
4450
type: string
51+
artifact-upload:
52+
description: Whether or not to upload the build as an artifact.
53+
type: boolean
54+
required: false
55+
default: true
4556
artifact-name:
4657
description: The name of the artifact to upload.
4758
required: false
@@ -124,6 +135,7 @@ jobs:
124135
uses: actions/checkout@v3
125136
with:
126137
path: ${{ steps.vars.outputs.checkout-path }}
138+
ref: ${{ inputs.build-ref }}
127139

128140
- name: Initialize the build environment
129141
id: init
@@ -143,3 +155,4 @@ jobs:
143155
build-script: ${{ steps.init.outputs.build-script }}
144156
build-html: ${{ steps.init.outputs.build-html }}
145157
artifact-name: ${{ inputs.artifact-name }}
158+
artifact-upload: ${{ inputs.artifact-upload }}

0 commit comments

Comments
 (0)