You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Matching by [semver spec](https://github.com/npm/node-semver):
42
42
43
43
```yaml
44
44
steps:
45
-
- uses: actions/checkout@v3
45
+
- uses: actions/checkout@v4
46
46
- uses: actions/setup-go@v4
47
47
with:
48
48
go-version: '^1.13.1'# The Go version to download (if necessary) and use.
@@ -51,25 +51,25 @@ steps:
51
51
52
52
```yaml
53
53
steps:
54
-
- uses: actions/checkout@v3
54
+
- uses: actions/checkout@v4
55
55
- uses: actions/setup-go@v4
56
56
with:
57
57
go-version: '>=1.17.0'
58
58
- run: go version
59
59
```
60
60
61
61
> **Note**: Due to the peculiarities of YAML parsing, it is recommended to wrap the version in single quotation marks:
62
-
>
62
+
>
63
63
> ```yaml
64
64
> go-version: '1.20'
65
65
> ```
66
-
>
66
+
>
67
67
> 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.
68
68
Matching an unstable pre-release:
69
69
70
70
```yaml
71
71
steps:
72
-
- uses: actions/checkout@v3
72
+
- uses: actions/checkout@v4
73
73
- uses: actions/setup-go@v4
74
74
with:
75
75
go-version: '1.18.0-rc.1' # The Go version to download (if necessary) and use.
@@ -78,7 +78,7 @@ steps:
78
78
79
79
```yaml
80
80
steps:
81
-
- uses: actions/checkout@v3
81
+
- uses: actions/checkout@v4
82
82
- uses: actions/setup-go@v4
83
83
with:
84
84
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)
93
93
94
94
```yaml
95
95
steps:
96
-
- uses: actions/checkout@v3
96
+
- uses: actions/checkout@v4
97
97
- uses: actions/setup-go@v4
98
98
with:
99
99
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.
114
114
115
115
```yaml
116
116
steps:
117
-
- uses: actions/checkout@v3
117
+
- uses: actions/checkout@v4
118
118
- uses: actions/setup-go@v4
119
119
with:
120
120
go-version: '1.14'
@@ -135,7 +135,7 @@ set to `true`
135
135
136
136
```yaml
137
137
steps:
138
-
- uses: actions/checkout@v3
138
+
- uses: actions/checkout@v4
139
139
- uses: actions/setup-go@v4
140
140
with:
141
141
go-version: 'stable'
@@ -144,7 +144,7 @@ steps:
144
144
145
145
```yaml
146
146
steps:
147
-
- uses: actions/checkout@v3
147
+
- uses: actions/checkout@v4
148
148
- uses: actions/setup-go@v4
149
149
with:
150
150
go-version: 'oldstable'
@@ -161,20 +161,20 @@ The action defaults to search for the dependency file - go.sum in the repository
161
161
the cache key. Use `cache-dependency-path` input for cases when multiple dependency files are used, or they are located
162
162
in different subdirectories. The input supports glob patterns.
163
163
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.
165
165
166
166
**Caching in monorepos**
167
167
168
168
```yaml
169
169
steps:
170
-
- uses: actions/checkout@v3
170
+
- uses: actions/checkout@v4
171
171
- uses: actions/setup-go@v4
172
172
with:
173
173
go-version: '1.17'
174
174
check-latest: true
175
175
cache-dependency-path: |
176
-
subdir/go.sum
177
-
tools/go.sum
176
+
subdir/go.sum
177
+
tools/go.sum
178
178
# cache-dependency-path: "**/*.sum"
179
179
180
180
- run: go run hello.go
@@ -193,7 +193,7 @@ If both the `go-version` and the `go-version-file` inputs are provided then the
Copy file name to clipboardExpand all lines: docs/adrs/0000-caching-dependencies.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Date: 2022-04-13
4
4
Status: Accepted
5
5
6
6
# 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.
8
8
See more examples on proper usage in [actions/cache documentation](https://github.com/actions/cache/blob/main/examples.md#go---modules).
9
9
10
10
# Goals & Anti-Goals
@@ -16,7 +16,7 @@ Integration of caching functionality into `actions/setup-go` action will bring t
16
16
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.
17
17
18
18
# 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:
20
20
-`true` - enable caching for go dependencies
21
21
-`false`- disable caching for go dependencies. This value will be set as default value
22
22
- 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
32
32
33
33
```yml
34
34
steps:
35
-
- uses: actions/checkout@v3
35
+
- uses: actions/checkout@v4
36
36
- uses: actions/setup-go@v3
37
37
with:
38
38
go-version: '18'
@@ -43,7 +43,7 @@ steps:
43
43
44
44
```yml
45
45
steps:
46
-
- uses: actions/checkout@v3
46
+
- uses: actions/checkout@v4
47
47
- uses: actions/setup-go@v3
48
48
with:
49
49
go-version: '18'
@@ -53,7 +53,7 @@ steps:
53
53
54
54
```yml
55
55
steps:
56
-
- uses: actions/checkout@v3
56
+
- uses: actions/checkout@v4
57
57
- uses: actions/setup-go@v3
58
58
with:
59
59
go-version: '18'
@@ -66,4 +66,4 @@ steps:
66
66
# Release process
67
67
68
68
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