Skip to content

Commit

Permalink
Merge branch 'main' of github.com:actions/setup-go into go-1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
chenrui333 committed Sep 19, 2023
2 parents a852e3b + bfd2fb3 commit 90844c4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/versions.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go Stable
uses: ./
with:
Expand All @@ -35,7 +35,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go oldStable
uses: ./
with:
Expand All @@ -55,7 +55,7 @@ jobs:
- os: macos-latest
architecture: x32
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.version }} ${{ matrix.architecture }}
uses: ./
with:
Expand All @@ -74,7 +74,7 @@ jobs:
go: [1.17, 1.18, 1.19]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup-go ${{ matrix.go }}
uses: ./
Expand All @@ -93,7 +93,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: [1.16, 1.17]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go and check latest
uses: ./
with:
Expand All @@ -109,7 +109,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go and check latest
uses: ./
with:
Expand All @@ -125,7 +125,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go and check latest
uses: ./
with:
Expand All @@ -144,7 +144,7 @@ jobs:
go: [1.12.16, 1.13.11, 1.14.3]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup-go ${{ matrix.go }}
uses: ./
Expand All @@ -165,7 +165,7 @@ jobs:
go: [1.9, 1.8.6]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup-go ${{ matrix.go }}
uses: ./
Expand All @@ -184,7 +184,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: [1.16, 1.17]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go and check latest
uses: ./
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows-validation.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
cache: [false, true]
go: [1.21.0]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: 'Setup ${{ matrix.cache }}, cache: ${{ matrix.go }}'
uses: ./
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
matrix:
cache: [false, true]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: 'Setup default go, cache: ${{ matrix.cache }}'
uses: ./
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
cache: [false]
go: [1.20.1]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
uses: ./
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -25,7 +25,7 @@ outputs:
cache-hit:
description: 'A boolean value to indicate if a cache was hit'
runs:
using: 'node16'
using: 'node20'
main: 'dist/setup/index.js'
post: 'dist/cache-save/index.js'
post-if: success()
12 changes: 6 additions & 6 deletions docs/adrs/0000-caching-dependencies.md
Expand Up @@ -4,7 +4,7 @@ Date: 2022-04-13
Status: Accepted

# Context
`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.
`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.
See more examples on proper usage in [actions/cache documentation](https://github.com/actions/cache/blob/main/examples.md#go---modules).

# Goals & Anti-Goals
Expand All @@ -16,7 +16,7 @@ Integration of caching functionality into `actions/setup-go` action will bring t
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.

# Decision
- Add `cache` input parameter to `actions/setup-go`. For now, input will accept the following values:
- Add `cache` input parameter to `actions/setup-go`. For now, input will accept the following values:
- `true` - enable caching for go dependencies
- `false`- disable caching for go dependencies. This value will be set as default value
- 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
Expand All @@ -32,7 +32,7 @@ We don't pursue the goal to provide wide customization of caching in scope of `a

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '18'
Expand All @@ -43,7 +43,7 @@ steps:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '18'
Expand All @@ -53,7 +53,7 @@ steps:

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '18'
Expand All @@ -66,4 +66,4 @@ steps:
# Release process

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.
After that, we will update [starter-workflows](https://github.com/actions/starter-workflows/blob/main/ci/go.yml)
After that, we will update [starter-workflows](https://github.com/actions/starter-workflows/blob/main/ci/go.yml)

0 comments on commit 90844c4

Please sign in to comment.