Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b56dadf

Browse files
authored
Merge pull request #801 from per1234/go_mod-versioning
Use `go.mod` as source of Go version number for workflows
2 parents f93350f + 79de0f2 commit b56dadf

12 files changed

+28
-51
lines changed

‎.github/workflows/check-code-generation-task.yml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Check Code Generation
22

3-
env:
4-
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
5-
GO_VERSION: "1.22"
6-
73
on:
84
create:
95
push:
@@ -61,7 +57,7 @@ jobs:
6157
- name: Install Go
6258
uses: actions/setup-go@v5
6359
with:
64-
go-version: ${{ env.GO_VERSION }}
60+
go-version-file: go.mod
6561

6662
- name: Install Task
6763
uses: arduino/setup-task@v2

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-go-dependencies-task.md
22
name: Check Go Dependencies
33

4-
env:
5-
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
6-
GO_VERSION: "1.22"
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -87,7 +83,7 @@ jobs:
8783
- name: Install Go
8884
uses: actions/setup-go@v5
8985
with:
90-
go-version: ${{ env.GO_VERSION }}
86+
go-version-file: go.mod
9187

9288
- name: Install Task
9389
uses: arduino/setup-task@v2
@@ -146,7 +142,7 @@ jobs:
146142
- name: Install Go
147143
uses: actions/setup-go@v5
148144
with:
149-
go-version: ${{ env.GO_VERSION }}
145+
go-version-file: go.mod
150146

151147
- name: Install Task
152148
uses: arduino/setup-task@v2

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-go-task.md
22
name: Check Go
33

4-
env:
5-
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
6-
GO_VERSION: "1.22"
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -77,7 +73,7 @@ jobs:
7773
- name: Install Go
7874
uses: actions/setup-go@v5
7975
with:
80-
go-version: ${{ env.GO_VERSION }}
76+
go-version-file: go.mod
8177

8278
- name: Install Task
8379
uses: arduino/setup-task@v2
@@ -114,7 +110,7 @@ jobs:
114110
- name: Install Go
115111
uses: actions/setup-go@v5
116112
with:
117-
go-version: ${{ env.GO_VERSION }}
113+
go-version-file: go.mod
118114

119115
- name: Install Task
120116
uses: arduino/setup-task@v2
@@ -154,7 +150,7 @@ jobs:
154150
- name: Install Go
155151
uses: actions/setup-go@v5
156152
with:
157-
go-version: ${{ env.GO_VERSION }}
153+
go-version-file: go.mod
158154

159155
- name: Install Task
160156
uses: arduino/setup-task@v2
@@ -194,7 +190,7 @@ jobs:
194190
- name: Install Go
195191
uses: actions/setup-go@v5
196192
with:
197-
go-version: ${{ env.GO_VERSION }}
193+
go-version-file: go.mod
198194

199195
- name: Install Task
200196
uses: arduino/setup-task@v2
@@ -234,7 +230,7 @@ jobs:
234230
- name: Install Go
235231
uses: actions/setup-go@v5
236232
with:
237-
go-version: ${{ env.GO_VERSION }}
233+
go-version-file: go.mod
238234

239235
- name: Install Task
240236
uses: arduino/setup-task@v2

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-markdown-task.md
22
name: Check Markdown
33

4-
env:
5-
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
6-
GO_VERSION: "1.22"
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -17,6 +13,8 @@ on:
1713
- "package-lock.json"
1814
- "Taskfile.ya?ml"
1915
- "**/.markdownlint*"
16+
- "**/go.mod"
17+
- "**/go.sum"
2018
- "**.mdx?"
2119
- "**.mkdn"
2220
- "**.mdown"
@@ -30,6 +28,8 @@ on:
3028
- "package-lock.json"
3129
- "Taskfile.ya?ml"
3230
- "**/.markdownlint*"
31+
- "**/go.mod"
32+
- "**/go.sum"
3333
- "**.mdx?"
3434
- "**.mkdn"
3535
- "**.mdown"
@@ -107,7 +107,7 @@ jobs:
107107
- name: Install Go
108108
uses: actions/setup-go@v5
109109
with:
110-
go-version: ${{ env.GO_VERSION }}
110+
go-version-file: go.mod
111111

112112
- name: Setup Node.js
113113
uses: actions/setup-node@v4

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-mkdocs-task.md
22
name: Check Website
33

4-
env:
5-
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
6-
GO_VERSION: "1.22"
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
117
push:
128
paths:
139
- ".github/workflows/check-mkdocs-task.ya?ml"
1410
- "**/.npmrc"
11+
- "**/go.mod"
12+
- "**/go.sum"
1513
- "Taskfile.ya?ml"
1614
- "mkdocs.ya?ml"
1715
- "package.json"
@@ -26,6 +24,8 @@ on:
2624
paths:
2725
- ".github/workflows/check-mkdocs-task.ya?ml"
2826
- "**/.npmrc"
27+
- "**/go.mod"
28+
- "**/go.sum"
2929
- "Taskfile.ya?ml"
3030
- "mkdocs.ya?ml"
3131
- "package.json"
@@ -81,7 +81,7 @@ jobs:
8181
- name: Install Go
8282
uses: actions/setup-go@v5
8383
with:
84-
go-version: ${{ env.GO_VERSION }}
84+
go-version-file: go.mod
8585

8686
- name: Install Python
8787
uses: actions/setup-python@v5

‎.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/deploy-cobra-mkdocs-versioned-poetry.md
22
name: Deploy Website
33

4-
env:
5-
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
6-
GO_VERSION: "1.22"
7-
84
on:
95
push:
106
branches:
@@ -69,7 +65,7 @@ jobs:
6965
- name: Install Go
7066
uses: actions/setup-go@v5
7167
with:
72-
go-version: ${{ env.GO_VERSION }}
68+
go-version-file: go.mod
7369

7470
- name: Install Python
7571
uses: actions/setup-python@v5

‎.github/workflows/test-go-integration-task.yml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/test-go-integration-task.md
22
name: Test Integration
33

4-
env:
5-
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
6-
GO_VERSION: "1.22"
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -81,7 +77,7 @@ jobs:
8177
- name: Install Go
8278
uses: actions/setup-go@v5
8379
with:
84-
go-version: ${{ env.GO_VERSION }}
80+
go-version-file: go.mod
8581

8682
- name: Install Python
8783
uses: actions/setup-python@v5

‎.github/workflows/test-go-task.yml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/test-go-task.md
22
name: Test Go
33

4-
env:
5-
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
6-
GO_VERSION: "1.22"
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -91,7 +87,7 @@ jobs:
9187
- name: Install Go
9288
uses: actions/setup-go@v5
9389
with:
94-
go-version: ${{ env.GO_VERSION }}
90+
go-version-file: go.mod
9591

9692
- name: Install Task
9793
uses: arduino/setup-task@v2

‎DistTasks.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ version: "3"
1919

2020
vars:
2121
CONTAINER: "docker.elastic.co/beats-dev/golang-crossbuild"
22-
GO_VERSION: "1.22.5"
22+
GO_VERSION: "1.22.9"
2323

2424
tasks:
2525
Windows_32bit:
@@ -131,11 +131,12 @@ tasks:
131131
desc: Builds Linux ARMv6 binaries
132132
dir: "{{.DIST_DIR}}"
133133
cmds:
134+
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
134135
- |
135136
docker run -v `pwd`/..:/home/build -w /home/build \
136137
-e CGO_ENABLED=0 \
137138
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
138-
--build-cmd "{{.BUILD_COMMAND}}" \
139+
--build-cmd "git config --global --add safe.directory /home/build && {{.BUILD_COMMAND}}" \
139140
-p "{{.BUILD_PLATFORM}}"
140141
141142
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
@@ -172,7 +173,7 @@ tasks:
172173
#
173174
# Until there is a fix released we must use a recent gcc for Linux_ARMv6 build, so for this
174175
# build we select the debian10 based container.
175-
CONTAINER_TAG: "{{.GO_VERSION}}-armel-debian9"
176+
CONTAINER_TAG: "{{.GO_VERSION}}-armel-debian12"
176177
PACKAGE_PLATFORM: "Linux_ARMv6"
177178
PACKAGE_NAME: "{{.PROJECT_NAME}}_{{.VERSION}}_{{.PACKAGE_PLATFORM}}.tar.gz"
178179

‎docsgen/go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/cobra/docsgen/go.mod
22
module github.com/arduino/arduino-lint/docsgen
33

4-
go 1.22.3
4+
go 1.22.9
55

66
replace github.com/arduino/arduino-lint => ../
77

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /