Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9c18d65

Browse files
committed
Use Go module system to manage Task dependency
This approach allows control over the version of the Task task runner tool dependency used by project contributors and the CI/CD system. Updates will be managed via automated pull requests submitted by Dependabot.
1 parent 7da369c commit 9c18d65

13 files changed

Lines changed: 176 additions & 75 deletions

.github/workflows/check-files-task.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,16 @@ jobs:
4848
- name: Checkout repository
4949
uses: actions/checkout@v4
5050

51-
- name: Install Task
52-
uses: arduino/setup-task@v1
51+
- name: Install Go
52+
uses: actions/setup-go@v4
5353
with:
54-
repo-token: ${{ secrets.GITHUB_TOKEN }}
55-
version: 3.x
54+
go-version-file: go.mod
55+
56+
- name: Install Task
57+
run: |
58+
go \
59+
install \
60+
github.com/go-task/task/v3/cmd/task
5661
5762
- name: Check filenames
5863
run: task --silent general:check-filenames
@@ -68,11 +73,16 @@ jobs:
6873
- name: Checkout repository
6974
uses: actions/checkout@v4
7075

71-
- name: Install Task
72-
uses: arduino/setup-task@v1
76+
- name: Install Go
77+
uses: actions/setup-go@v4
7378
with:
74-
repo-token: ${{ secrets.GITHUB_TOKEN }}
75-
version: 3.x
79+
go-version-file: go.mod
80+
81+
- name: Install Task
82+
run: |
83+
go \
84+
install \
85+
github.com/go-task/task/v3/cmd/task
7686
7787
- name: Check symlinks
7888
run: task --silent general:check-symlinks

.github/workflows/check-general-formatting-task.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
go-version-file: go.mod
5555

5656
- name: Install Task
57-
uses: arduino/setup-task@v1
58-
with:
59-
repo-token: ${{ secrets.GITHUB_TOKEN }}
60-
version: 3.x
57+
run: |
58+
go \
59+
install \
60+
github.com/go-task/task/v3/cmd/task
6161
6262
- name: Check formatting
6363
run: task --silent general:check-formatting

.github/workflows/check-go-task.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ jobs:
7676
go-version-file: ${{ matrix.module.path }}/go.mod
7777

7878
- name: Install Task
79-
uses: arduino/setup-task@v1
80-
with:
81-
repo-token: ${{ secrets.GITHUB_TOKEN }}
82-
version: 3.x
79+
run: |
80+
go \
81+
install \
82+
github.com/go-task/task/v3/cmd/task
8383
8484
- name: Modernize usages of outdated APIs
8585
env:
@@ -114,10 +114,10 @@ jobs:
114114
go-version-file: ${{ matrix.module.path }}/go.mod
115115

116116
- name: Install Task
117-
uses: arduino/setup-task@v1
118-
with:
119-
repo-token: ${{ secrets.GITHUB_TOKEN }}
120-
version: 3.x
117+
run: |
118+
go \
119+
install \
120+
github.com/go-task/task/v3/cmd/task
121121
122122
- name: Check style
123123
env:
@@ -149,10 +149,10 @@ jobs:
149149
go-version-file: ${{ matrix.module.path }}/go.mod
150150

151151
- name: Install Task
152-
uses: arduino/setup-task@v1
153-
with:
154-
repo-token: ${{ secrets.GITHUB_TOKEN }}
155-
version: 3.x
152+
run: |
153+
go \
154+
install \
155+
github.com/go-task/task/v3/cmd/task
156156
157157
- name: Format code
158158
env:
@@ -187,10 +187,10 @@ jobs:
187187
go-version-file: ${{ matrix.module.path }}/go.mod
188188

189189
- name: Install Task
190-
uses: arduino/setup-task@v1
191-
with:
192-
repo-token: ${{ secrets.GITHUB_TOKEN }}
193-
version: 3.x
190+
run: |
191+
go \
192+
install \
193+
github.com/go-task/task/v3/cmd/task
194194
195195
- name: Run go mod tidy
196196
env:

.github/workflows/check-markdown-task.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,16 @@ jobs:
7878
- name: Initialize markdownlint-cli problem matcher
7979
uses: xt0rted/markdownlint-problem-matcher@v2
8080

81-
- name: Install Task
82-
uses: arduino/setup-task@v1
81+
- name: Install Go
82+
uses: actions/setup-go@v4
8383
with:
84-
repo-token: ${{ secrets.GITHUB_TOKEN }}
85-
version: 3.x
84+
go-version-file: go.mod
85+
86+
- name: Install Task
87+
run: |
88+
go \
89+
install \
90+
github.com/go-task/task/v3/cmd/task
8691
8792
- name: Lint
8893
run: task markdown:lint
@@ -103,11 +108,16 @@ jobs:
103108
with:
104109
node-version-file: package.json
105110

106-
- name: Install Task
107-
uses: arduino/setup-task@v1
111+
- name: Install Go
112+
uses: actions/setup-go@v4
108113
with:
109-
repo-token: ${{ secrets.GITHUB_TOKEN }}
110-
version: 3.x
114+
go-version-file: go.mod
115+
116+
- name: Install Task
117+
run: |
118+
go \
119+
install \
120+
github.com/go-task/task/v3/cmd/task
111121
112122
- name: Check links
113123
run: task --silent markdown:check-links

.github/workflows/check-npm-task.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,16 @@ jobs:
6565
with:
6666
node-version-file: package.json
6767

68-
- name: Install Task
69-
uses: arduino/setup-task@v1
68+
- name: Install Go
69+
uses: actions/setup-go@v4
7070
with:
71-
repo-token: ${{ secrets.GITHUB_TOKEN }}
72-
version: 3.x
71+
go-version-file: go.mod
72+
73+
- name: Install Task
74+
run: |
75+
go \
76+
install \
77+
github.com/go-task/task/v3/cmd/task
7378
7479
- name: Validate package.json
7580
run: task --silent npm:validate
@@ -90,11 +95,16 @@ jobs:
9095
with:
9196
node-version-file: package.json
9297

93-
- name: Install Task
94-
uses: arduino/setup-task@v1
98+
- name: Install Go
99+
uses: actions/setup-go@v4
95100
with:
96-
repo-token: ${{ secrets.GITHUB_TOKEN }}
97-
version: 3.x
101+
go-version-file: go.mod
102+
103+
- name: Install Task
104+
run: |
105+
go \
106+
install \
107+
github.com/go-task/task/v3/cmd/task
98108
99109
- name: Install npm dependencies
100110
run: task npm:install-deps

.github/workflows/check-poetry-task.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,16 @@ jobs:
6767
--python "$(which python)" \
6868
poetry
6969
70-
- name: Install Task
71-
uses: arduino/setup-task@v1
70+
- name: Install Go
71+
uses: actions/setup-go@v4
7272
with:
73-
repo-token: ${{ secrets.GITHUB_TOKEN }}
74-
version: 3.x
73+
go-version-file: go.mod
74+
75+
- name: Install Task
76+
run: |
77+
go \
78+
install \
79+
github.com/go-task/task/v3/cmd/task
7580
7681
- name: Validate pyproject.toml
7782
run: task poetry:validate
@@ -98,11 +103,16 @@ jobs:
98103
--python "$(which python)" \
99104
poetry
100105
101-
- name: Install Task
102-
uses: arduino/setup-task@v1
106+
- name: Install Go
107+
uses: actions/setup-go@v4
103108
with:
104-
repo-token: ${{ secrets.GITHUB_TOKEN }}
105-
version: 3.x
109+
go-version-file: go.mod
110+
111+
- name: Install Task
112+
run: |
113+
go \
114+
install \
115+
github.com/go-task/task/v3/cmd/task
106116
107117
- name: Sync lockfile
108118
run: task poetry:sync

.github/workflows/check-prettier-formatting-task.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,16 @@ jobs:
243243
with:
244244
node-version-file: package.json
245245

246-
- name: Install Task
247-
uses: arduino/setup-task@v1
246+
- name: Install Go
247+
uses: actions/setup-go@v4
248248
with:
249-
repo-token: ${{ secrets.GITHUB_TOKEN }}
250-
version: 3.x
249+
go-version-file: go.mod
250+
251+
- name: Install Task
252+
run: |
253+
go \
254+
install \
255+
github.com/go-task/task/v3/cmd/task
251256
252257
- name: Format with Prettier
253258
run: task general:format-prettier

.github/workflows/check-workflows-task.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ jobs:
3636
with:
3737
node-version-file: package.json
3838

39-
- name: Install Task
40-
uses: arduino/setup-task@v1
39+
- name: Install Go
40+
uses: actions/setup-go@v4
4141
with:
42-
repo-token: ${{ secrets.GITHUB_TOKEN }}
43-
version: 3.x
42+
go-version-file: go.mod
43+
44+
- name: Install Task
45+
run: |
46+
go \
47+
install \
48+
github.com/go-task/task/v3/cmd/task
4449
4550
- name: Validate workflows
4651
run: task --silent ci:validate

.github/workflows/check-yaml-task.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,16 @@ jobs:
105105
--python "$(which python)" \
106106
poetry
107107
108-
- name: Install Task
109-
uses: arduino/setup-task@v1
108+
- name: Install Go
109+
uses: actions/setup-go@v4
110110
with:
111-
repo-token: ${{ secrets.GITHUB_TOKEN }}
112-
version: 3.x
111+
go-version-file: go.mod
112+
113+
- name: Install Task
114+
run: |
115+
go \
116+
install \
117+
github.com/go-task/task/v3/cmd/task
113118
114119
- name: Check YAML
115120
continue-on-error: ${{ matrix.configuration.continue-on-error }}

.github/workflows/spell-check-task.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,16 @@ jobs:
5959
--python "$(which python)" \
6060
poetry
6161
62-
- name: Install Task
63-
uses: arduino/setup-task@v1
62+
- name: Install Go
63+
uses: actions/setup-go@v4
6464
with:
65-
repo-token: ${{ secrets.GITHUB_TOKEN }}
66-
version: 3.x
65+
go-version-file: go.mod
66+
67+
- name: Install Task
68+
run: |
69+
go \
70+
install \
71+
github.com/go-task/task/v3/cmd/task
6772
6873
- name: Spell check
6974
run: task general:check-spelling

0 commit comments

Comments
 (0)