Skip to content

Commit bfd2fb3

Browse files
Merge pull request #421 from chenrui333/node20-runtime
feat: upgrade to use node 20 runtime and bump checkout action to v4
2 parents 883490d + 3d65fa5 commit bfd2fb3

File tree

5 files changed

+37
-37
lines changed

5 files changed

+37
-37
lines changed

.github/workflows/versions.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
matrix:
2121
os: [ubuntu-latest, windows-latest, macos-latest]
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- name: Setup Go Stable
2525
uses: ./
2626
with:
@@ -35,7 +35,7 @@ jobs:
3535
matrix:
3636
os: [ubuntu-latest, windows-latest, macos-latest]
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
- name: Setup Go oldStable
4040
uses: ./
4141
with:
@@ -55,7 +55,7 @@ jobs:
5555
- os: macos-latest
5656
architecture: x32
5757
steps:
58-
- uses: actions/checkout@v3
58+
- uses: actions/checkout@v4
5959
- name: Setup Go ${{ matrix.version }} ${{ matrix.architecture }}
6060
uses: ./
6161
with:
@@ -74,7 +74,7 @@ jobs:
7474
go: [1.17, 1.18, 1.19]
7575
steps:
7676
- name: Checkout
77-
uses: actions/checkout@v3
77+
uses: actions/checkout@v4
7878

7979
- name: setup-go ${{ matrix.go }}
8080
uses: ./
@@ -93,7 +93,7 @@ jobs:
9393
os: [ubuntu-latest, windows-latest, macos-latest]
9494
go-version: [1.16, 1.17]
9595
steps:
96-
- uses: actions/checkout@v3
96+
- uses: actions/checkout@v4
9797
- name: Setup Go and check latest
9898
uses: ./
9999
with:
@@ -109,7 +109,7 @@ jobs:
109109
matrix:
110110
os: [ubuntu-latest, windows-latest, macos-latest]
111111
steps:
112-
- uses: actions/checkout@v3
112+
- uses: actions/checkout@v4
113113
- name: Setup Go and check latest
114114
uses: ./
115115
with:
@@ -125,7 +125,7 @@ jobs:
125125
matrix:
126126
os: [ubuntu-latest, windows-latest, macos-latest]
127127
steps:
128-
- uses: actions/checkout@v3
128+
- uses: actions/checkout@v4
129129
- name: Setup Go and check latest
130130
uses: ./
131131
with:
@@ -144,7 +144,7 @@ jobs:
144144
go: [1.12.16, 1.13.11, 1.14.3]
145145
steps:
146146
- name: Checkout
147-
uses: actions/checkout@v3
147+
uses: actions/checkout@v4
148148

149149
- name: setup-go ${{ matrix.go }}
150150
uses: ./
@@ -165,7 +165,7 @@ jobs:
165165
go: [1.9, 1.8.6]
166166
steps:
167167
- name: Checkout
168-
uses: actions/checkout@v3
168+
uses: actions/checkout@v4
169169

170170
- name: setup-go ${{ matrix.go }}
171171
uses: ./
@@ -184,7 +184,7 @@ jobs:
184184
os: [ubuntu-latest, windows-latest, macos-latest]
185185
go-version: [1.16, 1.17]
186186
steps:
187-
- uses: actions/checkout@v3
187+
- uses: actions/checkout@v4
188188
- name: Setup Go and check latest
189189
uses: ./
190190
with:

.github/workflows/windows-validation.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
cache: [false, true]
2020
go: [1.20.1]
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323

2424
- name: 'Setup ${{ matrix.cache }}, cache: ${{ matrix.go }}'
2525
uses: ./
@@ -61,7 +61,7 @@ jobs:
6161
echo 'which go should return "/c/hostedtoolcache/windows/go/${{ matrix.go }}/x64/bin/go"'
6262
exit 1
6363
fi
64-
if [ $(go env GOROOT) != 'C:\hostedtoolcache\windows\go\${{ matrix.go }}\x64' ];then
64+
if [ $(go env GOROOT) != 'C:\hostedtoolcache\windows\go\${{ matrix.go }}\x64' ];then
6565
echo 'go env GOROOT should return "C:\hostedtoolcache\windows\go\${{ matrix.go }}\x64"'
6666
exit 1
6767
fi
@@ -88,7 +88,7 @@ jobs:
8888
matrix:
8989
cache: [false, true]
9090
steps:
91-
- uses: actions/checkout@v3
91+
- uses: actions/checkout@v4
9292

9393
- name: 'Setup default go, cache: ${{ matrix.cache }}'
9494
uses: ./
@@ -121,7 +121,7 @@ jobs:
121121
cache: [false]
122122
go: [1.20.1]
123123
steps:
124-
- uses: actions/checkout@v3
124+
- uses: actions/checkout@v4
125125

126126
- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
127127
uses: ./

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Matching by [semver spec](https://github.com/npm/node-semver):
4242

4343
```yaml
4444
steps:
45-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4646
- uses: actions/setup-go@v4
4747
with:
4848
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
@@ -51,25 +51,25 @@ steps:
5151
5252
```yaml
5353
steps:
54-
- uses: actions/checkout@v3
54+
- uses: actions/checkout@v4
5555
- uses: actions/setup-go@v4
5656
with:
5757
go-version: '>=1.17.0'
5858
- run: go version
5959
```
6060
6161
> **Note**: Due to the peculiarities of YAML parsing, it is recommended to wrap the version in single quotation marks:
62-
>
62+
>
6363
> ```yaml
6464
> go-version: '1.20'
6565
> ```
66-
>
66+
>
6767
> The recommendation is based on the YAML parser's behavior, which interprets non-wrapped values as numbers and, in the case of version 1.20, trims it down to 1.2, which may not be very obvious.
6868
Matching an unstable pre-release:
6969

7070
```yaml
7171
steps:
72-
- uses: actions/checkout@v3
72+
- uses: actions/checkout@v4
7373
- uses: actions/setup-go@v4
7474
with:
7575
go-version: '1.18.0-rc.1' # The Go version to download (if necessary) and use.
@@ -78,7 +78,7 @@ steps:
7878

7979
```yaml
8080
steps:
81-
- uses: actions/checkout@v3
81+
- uses: actions/checkout@v4
8282
- uses: actions/setup-go@v4
8383
with:
8484
go-version: '1.16.0-beta.1' # The Go version to download (if necessary) and use.
@@ -93,7 +93,7 @@ See [action.yml](action.yml)
9393

9494
```yaml
9595
steps:
96-
- uses: actions/checkout@v3
96+
- uses: actions/checkout@v4
9797
- uses: actions/setup-go@v4
9898
with:
9999
go-version: '1.16.1' # The Go version to download (if necessary) and use.
@@ -114,7 +114,7 @@ want the most up-to-date Go version to always be used.
114114

115115
```yaml
116116
steps:
117-
- uses: actions/checkout@v3
117+
- uses: actions/checkout@v4
118118
- uses: actions/setup-go@v4
119119
with:
120120
go-version: '1.14'
@@ -135,7 +135,7 @@ set to `true`
135135

136136
```yaml
137137
steps:
138-
- uses: actions/checkout@v3
138+
- uses: actions/checkout@v4
139139
- uses: actions/setup-go@v4
140140
with:
141141
go-version: 'stable'
@@ -144,7 +144,7 @@ steps:
144144

145145
```yaml
146146
steps:
147-
- uses: actions/checkout@v3
147+
- uses: actions/checkout@v4
148148
- uses: actions/setup-go@v4
149149
with:
150150
go-version: 'oldstable'
@@ -161,20 +161,20 @@ The action defaults to search for the dependency file - go.sum in the repository
161161
the cache key. Use `cache-dependency-path` input for cases when multiple dependency files are used, or they are located
162162
in different subdirectories. The input supports glob patterns.
163163

164-
If some problem that prevents success caching happens then the action issues the warning in the log and continues the execution of the pipeline.
164+
If some problem that prevents success caching happens then the action issues the warning in the log and continues the execution of the pipeline.
165165

166166
**Caching in monorepos**
167167

168168
```yaml
169169
steps:
170-
- uses: actions/checkout@v3
170+
- uses: actions/checkout@v4
171171
- uses: actions/setup-go@v4
172172
with:
173173
go-version: '1.17'
174174
check-latest: true
175175
cache-dependency-path: |
176-
subdir/go.sum
177-
tools/go.sum
176+
subdir/go.sum
177+
tools/go.sum
178178
# cache-dependency-path: "**/*.sum"
179179
180180
- run: go run hello.go
@@ -193,7 +193,7 @@ If both the `go-version` and the `go-version-file` inputs are provided then the
193193

194194
```yaml
195195
steps:
196-
- uses: actions/checkout@v3
196+
- uses: actions/checkout@v4
197197
- uses: actions/setup-go@v4
198198
with:
199199
go-version-file: 'path/to/go.mod'
@@ -211,7 +211,7 @@ jobs:
211211
go: [ '1.14', '1.13' ]
212212
name: Go ${{ matrix.go }} sample
213213
steps:
214-
- uses: actions/checkout@v3
214+
- uses: actions/checkout@v4
215215
- name: Setup go
216216
uses: actions/setup-go@v4
217217
with:

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ outputs:
2525
cache-hit:
2626
description: 'A boolean value to indicate if a cache was hit'
2727
runs:
28-
using: 'node16'
28+
using: 'node20'
2929
main: 'dist/setup/index.js'
3030
post: 'dist/cache-save/index.js'
3131
post-if: success()

docs/adrs/0000-caching-dependencies.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Date: 2022-04-13
44
Status: Accepted
55

66
# Context
7-
`actions/setup-go` is the one of the most popular action related to Golang in GitHub Actions. Many customers use it in conjunction with [actions/cache](https://github.com/actions/cache) to speed up dependency installation process.
7+
`actions/setup-go` is the one of the most popular action related to Golang in GitHub Actions. Many customers use it in conjunction with [actions/cache](https://github.com/actions/cache) to speed up dependency installation process.
88
See more examples on proper usage in [actions/cache documentation](https://github.com/actions/cache/blob/main/examples.md#go---modules).
99

1010
# Goals & Anti-Goals
@@ -16,7 +16,7 @@ Integration of caching functionality into `actions/setup-go` action will bring t
1616
We don't pursue the goal to provide wide customization of caching in scope of `actions/setup-go` action. The purpose of this integration is covering ~90% of basic use-cases. If user needs flexible customization, we should advice them to use `actions/cache` directly.
1717

1818
# Decision
19-
- Add `cache` input parameter to `actions/setup-go`. For now, input will accept the following values:
19+
- Add `cache` input parameter to `actions/setup-go`. For now, input will accept the following values:
2020
- `true` - enable caching for go dependencies
2121
- `false`- disable caching for go dependencies. This value will be set as default value
2222
- Cache feature will be disabled by default to make sure that we don't break existing customers. We will consider enabling cache by default in next major releases
@@ -32,7 +32,7 @@ We don't pursue the goal to provide wide customization of caching in scope of `a
3232

3333
```yml
3434
steps:
35-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
3636
- uses: actions/setup-go@v3
3737
with:
3838
go-version: '18'
@@ -43,7 +43,7 @@ steps:
4343
4444
```yml
4545
steps:
46-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
4747
- uses: actions/setup-go@v3
4848
with:
4949
go-version: '18'
@@ -53,7 +53,7 @@ steps:
5353
5454
```yml
5555
steps:
56-
- uses: actions/checkout@v3
56+
- uses: actions/checkout@v4
5757
- uses: actions/setup-go@v3
5858
with:
5959
go-version: '18'
@@ -66,4 +66,4 @@ steps:
6666
# Release process
6767
6868
As soon as functionality is implemented, we will release minor update of action. No need to bump major version since there are no breaking changes for existing users.
69-
After that, we will update [starter-workflows](https://github.com/actions/starter-workflows/blob/main/ci/go.yml)
69+
After that, we will update [starter-workflows](https://github.com/actions/starter-workflows/blob/main/ci/go.yml)

0 commit comments

Comments
 (0)