diff --git a/content/actions/learn-github-actions/contexts.md b/content/actions/learn-github-actions/contexts.md index ffad10c4e104..cd083f13a1da 100644 --- a/content/actions/learn-github-actions/contexts.md +++ b/content/actions/learn-github-actions/contexts.md @@ -762,10 +762,14 @@ on: deploy_target: required: true type: string + perform_deploy: + required: true + type: boolean jobs: deploy: runs-on: ubuntu-latest + if: ${{ inputs.perform_deploy == 'true' }} steps: - name: Deploy build to target run: deploy --build ${{ inputs.build_id }} --target ${{ inputs.deploy_target }} diff --git a/data/reusables/github-actions/workflow-dispatch-inputs.md b/data/reusables/github-actions/workflow-dispatch-inputs.md index f7de2293a50c..1960a988087b 100644 --- a/data/reusables/github-actions/workflow-dispatch-inputs.md +++ b/data/reusables/github-actions/workflow-dispatch-inputs.md @@ -15,10 +15,14 @@ on: - info - warning - debug {% endif %} + print_tags: + description: 'True to print to STDOUT' + required: true {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} + type: boolean {% endif %} tags: description: 'Test scenario tags' - required: false {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} - type: boolean + required: true {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} + type: string environment: description: 'Environment to run tests against' type: environment @@ -30,5 +34,6 @@ jobs: steps: - name: Print the input tag to STDOUT - run: echo {% raw %} The tag is ${{ github.event.inputs.tag }} {% endraw %} + if: {% raw %} ${{ github.event.inputs.tags == 'true' }} {% endraw %} + run: echo {% raw %} The tag is ${{ github.event.inputs.tags }} {% endraw %} ```