99 - " other/clang-format-configuration/testdata/**"
1010 - " other/clang-format-configuration/.clang-format"
1111 - " .npmrc"
12+ - " go.mod"
13+ - " go.sum"
1214 - " package.json"
1315 - " package-lock.json"
1416 - " Taskfile.ya?ml"
1921 - " other/clang-format-configuration/testdata/**"
2022 - " other/clang-format-configuration/.clang-format"
2123 - " .npmrc"
24+ - " go.mod"
25+ - " go.sum"
2226 - " package.json"
2327 - " package-lock.json"
2428 - " Taskfile.ya?ml"
@@ -43,22 +47,22 @@ jobs:
4347 - name : Checkout repository
4448 uses : actions/checkout@v5
4549
50+ - name : Install Go
51+ uses : actions/setup-go@v5
52+ with :
53+ go-version-file : go.mod
54+
4655 - name : Setup Node.js
4756 uses : actions/setup-node@v4
4857 with :
4958 node-version-file : package.json
5059
51- - name : Install Task
52- uses : arduino/setup-task@v2
53- with :
54- repo-token : ${{ secrets.GITHUB_TOKEN }}
55- version : 3.x
56-
5760 - name : Validate ClangFormat configuration files
5861 run : |
59- task \
60- --silent \
61- clang-format:validate
62+ go tool \
63+ github.com/go-task/task/v3/cmd/task \
64+ --silent \
65+ clang-format:validate
6266
6367 check-config :
6468 runs-on : ubuntu-latest
@@ -68,17 +72,19 @@ jobs:
6872 - name : Checkout repository
6973 uses : actions/checkout@v5
7074
71- - name : Install Task
72- uses : arduino /setup-task@v2
75+ - name : Install Go
76+ uses : actions /setup-go@v5
7377 with :
74- repo-token : ${{ secrets.GITHUB_TOKEN }}
75- version : 3.x
78+ go-version-file : go.mod
7679
7780 - name : Set environment variables
7881 run : |
7982 # See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable
8083 if [[ "${{ github.event.inputs.clang-format-version }}" == "" ]]; then
81- echo "CLANG_FORMAT_VERSION=$(task clang-format:get-version)" >>"$GITHUB_ENV"
84+ echo "CLANG_FORMAT_VERSION=$(
85+ go tool \
86+ github.com/go-task/task/v3/cmd/task clang-format:get-version
87+ )" >>"$GITHUB_ENV"
8288 else
8389 echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >>"$GITHUB_ENV"
8490 fi
@@ -110,10 +116,11 @@ jobs:
110116 - name : Check ClangFormat configuration file
111117 id : check
112118 run : |
113- task \
114- --silent \
115- clang-format:check-config \
116- CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}"
119+ go tool \
120+ github.com/go-task/task/v3/cmd/task \
121+ --silent \
122+ clang-format:check-config \
123+ CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}"
117124
118125 - name : Save effective configuration file to a workflow artifact
119126 if : >
@@ -133,17 +140,19 @@ jobs:
133140 - name : Checkout repository
134141 uses : actions/checkout@v5
135142
136- - name : Install Task
137- uses : arduino /setup-task@v2
143+ - name : Install Go
144+ uses : actions /setup-go@v5
138145 with :
139- repo-token : ${{ secrets.GITHUB_TOKEN }}
140- version : 3.x
146+ go-version-file : go.mod
141147
142148 - name : Set environment variables
143149 run : |
144150 # See: https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable
145151 if [[ "${{ github.event.inputs.clang-format-version }}" == "" ]]; then
146- echo "CLANG_FORMAT_VERSION=$(task clang-format:get-version)" >>"$GITHUB_ENV"
152+ echo "CLANG_FORMAT_VERSION=$(
153+ go tool \
154+ github.com/go-task/task/v3/cmd/task clang-format:get-version
155+ )" >>"$GITHUB_ENV"
147156 else
148157 echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >>"$GITHUB_ENV"
149158 fi
@@ -175,10 +184,11 @@ jobs:
175184 - name : Check ClangFormat output
176185 id : check
177186 run : |
178- task \
179- clang-format:check-output \
180- CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}" \
181- WORKING_FOLDER="${{ env.WORKING_FOLDER }}"
187+ go tool \
188+ github.com/go-task/task/v3/cmd/task \
189+ clang-format:check-output \
190+ CLANG_FORMAT_VERSION="${{ env.CLANG_FORMAT_VERSION }}" \
191+ WORKING_FOLDER="${{ env.WORKING_FOLDER }}"
182192
183193 - name : Save formatted test data to a workflow artifact
184194 if : >
@@ -198,17 +208,17 @@ jobs:
198208 - name : Checkout repository
199209 uses : actions/checkout@v5
200210
201- - name : Install Task
202- uses : arduino /setup-task@v2
211+ - name : Install Go
212+ uses : actions /setup-go@v5
203213 with :
204- repo-token : ${{ secrets.GITHUB_TOKEN }}
205- version : 3.x
214+ go-version-file : go.mod
206215
207216 - name : Check ClangFormat test data
208217 run : |
209- task \
210- --silent \
211- clang-format:check-testdata
218+ go tool \
219+ github.com/go-task/task/v3/cmd/task \
220+ --silent \
221+ clang-format:check-testdata
212222
213223 convert :
214224 runs-on : ubuntu-latest
@@ -228,18 +238,18 @@ jobs:
228238 with :
229239 node-version-file : package.json
230240
231- - name : Install Task
232- uses : arduino /setup-task@v2
241+ - name : Install Go
242+ uses : actions /setup-go@v5
233243 with :
234- repo-token : ${{ secrets.GITHUB_TOKEN }}
235- version : 3.x
244+ go-version-file : go.mod
236245
237246 - name : Convert the ClangFormat configuration
238247 run : |
239- task \
240- --silent \
241- clang-format:convert \
242- OUTPUT_PATH="${{ env.CONVERSION_OUTPUT_PATH }}"
248+ go tool \
249+ github.com/go-task/task/v3/cmd/task \
250+ --silent \
251+ clang-format:convert \
252+ OUTPUT_PATH="${{ env.CONVERSION_OUTPUT_PATH }}"
243253
244254 - name : Save conversion to a workflow artifact
245255 uses : actions/upload-artifact@v4
0 commit comments