Skip to content

Commit 88eb164

Browse files
authored
Merge pull request #237 from per1234/tool-version-vars
Use workflow variables for tool versions in all workflows
2 parents dc2e4b0 + 7a9da9e commit 88eb164

5 files changed

+28
-12
lines changed

Diff for: .github/workflows/check-code-generation-task.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Check Code Generation
22

3+
env:
4+
# See: https://github.com/actions/setup-go/tree/v2#readme
5+
GO_VERSION: "1.16"
6+
37
on:
48
push:
59
paths:
@@ -18,9 +22,6 @@ on:
1822
- "**/*.go"
1923
- "etc/schemas/**/*.json"
2024

21-
env:
22-
BUILDS_ARTIFACT: build-artifacts
23-
2425
jobs:
2526
test-go:
2627
runs-on: ubuntu-latest
@@ -32,7 +33,7 @@ jobs:
3233
- name: Install Go
3334
uses: actions/setup-go@v2
3435
with:
35-
go-version: "1.16"
36+
go-version: ${{ env.GO_VERSION }}
3637

3738
- name: Install Taskfile
3839
uses: arduino/setup-task@v1

Diff for: .github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
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-python/tree/v2#available-versions-of-python
6+
PYTHON_VERSION: "3.9"
7+
48
on:
59
push:
610
branches:
@@ -52,7 +56,7 @@ jobs:
5256
- name: Install Python
5357
uses: actions/setup-python@v2
5458
with:
55-
python-version: "3.9"
59+
python-version: ${{ env.PYTHON_VERSION }}
5660

5761
- name: Install Poetry
5862
run: |

Diff for: .github/workflows/spell-check-task.yml

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

4+
env:
5+
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
6+
PYTHON_VERSION: "3.9"
7+
48
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
59
on:
610
push:
@@ -22,7 +26,7 @@ jobs:
2226
- name: Install Python
2327
uses: actions/setup-python@v2
2428
with:
25-
python-version: "3.9"
29+
python-version: ${{ env.PYTHON_VERSION }}
2630

2731
- name: Install Poetry
2832
run: pip install poetry

Diff for: .github/workflows/test-go-integration-task.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Test Integration
22

3+
env:
4+
# See: https://github.com/actions/setup-go/tree/v2#readme
5+
GO_VERSION: "1.16"
6+
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
7+
PYTHON_VERSION: "3.9"
8+
39
on:
410
push:
511
paths:
@@ -40,7 +46,7 @@ jobs:
4046
- name: Install Go
4147
uses: actions/setup-go@v2
4248
with:
43-
go-version: "1.16"
49+
go-version: ${{ env.GO_VERSION }}
4450

4551
- name: Install Taskfile
4652
uses: arduino/setup-task@v1
@@ -51,7 +57,7 @@ jobs:
5157
- name: Install Python
5258
uses: actions/setup-python@v2
5359
with:
54-
python-version: "3.9"
60+
python-version: ${{ env.PYTHON_VERSION }}
5561

5662
- name: Install Poetry
5763
run: pip install poetry

Diff for: .github/workflows/test-go-task.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Run tests
22

3+
env:
4+
# See: https://github.com/actions/setup-go/tree/v2#readme
5+
GO_VERSION: "1.16"
6+
37
on:
48
push:
59
paths:
@@ -18,9 +22,6 @@ on:
1822
- "**/*.go"
1923
- "**/testdata/**"
2024

21-
env:
22-
BUILDS_ARTIFACT: build-artifacts
23-
2425
jobs:
2526
test-go:
2627
strategy:
@@ -39,7 +40,7 @@ jobs:
3940
- name: Install Go
4041
uses: actions/setup-go@v2
4142
with:
42-
go-version: "1.16"
43+
go-version: ${{ env.GO_VERSION }}
4344

4445
- name: Install Taskfile
4546
uses: arduino/setup-task@v1

0 commit comments

Comments
 (0)