Skip to content

Instantly share code, notes, and snippets.

@dracorp
Created February 16, 2023 14:17
Show Gist options
  • Save dracorp/0c5257379df4c148459c1bb6a0d977b3 to your computer and use it in GitHub Desktop.
Save dracorp/0c5257379df4c148459c1bb6a0d977b3 to your computer and use it in GitHub Desktop.
# https://stackoverflow.com/a/63670795/4293785
parameters:
- name: RunTask
displayName: Run task?
type: boolean
default: true
steps:
- pwsh: Write-Host "always run this task"
- pwsh: Write-Host "skip this task when checkbox unticked..."
condition: eq(${{ parameters.RunTask }}, true)
- pwsh: Write-Host "skip this task when checkbox unticked..."
enabled: ${{ parameters.RunTask }}
- ${{ if eq(parameters.RunTask, true) }}:
- pwsh: Write-Host "skip this task when checkbox unticked..."
- ${{ if parameters.RunTask }}:
- pwsh: Write-Host "skip this task when checkbox unticked..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment