@@ -10,7 +10,7 @@ inputs:
1010 description : ' The branch, tag or SHA to checkout'
1111 required : false
1212 checkout-token :
13- description : ' Personal access token (PAT) used to fetch the repository'
13+ description : ' Personal access token (PAT) used to fetch the repository and set up task '
1414 required : false
1515 checkout-fetch-depth :
1616 description : ' Depth of commit history to fetch'
@@ -116,6 +116,18 @@ inputs:
116116 swift-sdks :
117117 description : ' Semi-colon separated list of Swift SDKs to install along with the main toolchain.'
118118 required : false
119+ setup-task :
120+ description : ' Whether to setup Task'
121+ required : false
122+ default : ' false'
123+ task-version :
124+ description : ' Task version to use'
125+ required : false
126+ default : ' 3.50.0'
127+ task-retries :
128+ description : ' Number of retries for Task setup in case of failure, default is 3.'
129+ required : false
130+ default : ' 3'
119131
120132# expose outputs from the sub-actions
121133outputs :
@@ -361,6 +373,26 @@ runs:
361373 prefer-oss-toolchain : ${{ inputs.swift-prefer-oss-toolchain == 'true' }}
362374 sdks : ${{ inputs.swift-sdks || '' }}
363375
376+ - name : Set Up Task Parameters
377+ id : setup-task-params
378+ if : ${{ inputs.setup-task == 'true' }}
379+ shell : bash
380+ run : |
381+ echo "::group::Setting up Task"
382+ echo "Version: ${{ inputs.task-version }}"
383+ echo "Repo Token Provided: ${{ inputs.checkout-token != '' }}"
384+ echo "Task Max Retries: ${{ inputs.task-retries }}"
385+ echo "::endgroup::"
386+
387+ - name : Setup Task
388+ id : setup-task
389+ if : ${{ inputs.setup-task == 'true' }}
390+ uses : go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v3.50.0
391+ with :
392+ version : ${{ inputs.task-version }}
393+ repo-token : ${{ inputs.checkout-token }}
394+ max-retries : ${{ inputs.task-retries }}
395+
364396branding :
365397 icon : ' arrow-up-right'
366398 color : ' green'
0 commit comments