mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2026-08-27 20:44:57 -04:00
chore: upgrade checkout/setup-go refs to v7
This commit is contained in:
parent
b7ad1dad31
commit
743fe92b0d
6 changed files with 76 additions and 76 deletions
8
.github/workflows/microsoft-validation.yml
vendored
8
.github/workflows/microsoft-validation.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
go-version: ['1.25', '1.24']
|
go-version: ['1.25', '1.24']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: Setup Microsoft build of Go ${{ matrix.go-version }}
|
- name: Setup Microsoft build of Go ${{ matrix.go-version }}
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -59,7 +59,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GO_DOWNLOAD_BASE_URL: 'https://aka.ms/golang/release/latest'
|
GO_DOWNLOAD_BASE_URL: 'https://aka.ms/golang/release/latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: Setup Microsoft build of Go via environment variable
|
- name: Setup Microsoft build of Go via environment variable
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -95,7 +95,7 @@ jobs:
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
architecture: arm64
|
architecture: arm64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: Setup Microsoft build of Go with architecture
|
- name: Setup Microsoft build of Go with architecture
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -116,7 +116,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: Setup Microsoft build of Go with caching
|
- name: Setup Microsoft build of Go with caching
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checking out
|
- name: Checking out
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Publish
|
- name: Publish
|
||||||
id: publish
|
id: publish
|
||||||
uses: actions/publish-immutable-action@v0.0.4
|
uses: actions/publish-immutable-action@v0.0.4
|
||||||
|
|
|
||||||
24
.github/workflows/versions.yml
vendored
24
.github/workflows/versions.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go Stable
|
- name: Setup Go Stable
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -35,7 +35,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go oldStable
|
- name: Setup Go oldStable
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -57,7 +57,7 @@ jobs:
|
||||||
- os: macos-latest-large
|
- os: macos-latest-large
|
||||||
architecture: x32
|
architecture: x32
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go ${{ matrix.version }} ${{ matrix.architecture }}
|
- name: Setup Go ${{ matrix.version }} ${{ matrix.architecture }}
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -82,7 +82,7 @@ jobs:
|
||||||
go: 1.23.2
|
go: 1.23.2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: setup-go ${{ matrix.go }}
|
- name: setup-go ${{ matrix.go }}
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -101,7 +101,7 @@ jobs:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
||||||
go-version: ['1.20', '1.21', '1.22', '1.23']
|
go-version: ['1.20', '1.21', '1.22', '1.23']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go and check latest
|
- name: Setup Go and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -117,7 +117,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go and check latest
|
- name: Setup Go and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -133,7 +133,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go and check latest
|
- name: Setup Go and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -149,7 +149,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go and check latest
|
- name: Setup Go and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -165,7 +165,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go from .go-version file
|
- name: Setup Go from .go-version file
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -183,7 +183,7 @@ jobs:
|
||||||
go: [1.20.14, 1.21.10, 1.22.8, 1.23.2]
|
go: [1.20.14, 1.21.10, 1.22.8, 1.23.2]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: setup-go ${{ matrix.go }}
|
- name: setup-go ${{ matrix.go }}
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -203,7 +203,7 @@ jobs:
|
||||||
go: [1.11.12]
|
go: [1.11.12]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: setup-go ${{ matrix.go }}
|
- name: setup-go ${{ matrix.go }}
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -231,7 +231,7 @@ jobs:
|
||||||
- os: macos-latest-large
|
- os: macos-latest-large
|
||||||
architecture: x64
|
architecture: x64
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: Setup Go and check latest
|
- name: Setup Go and check latest
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
6
.github/workflows/windows-validation.yml
vendored
6
.github/workflows/windows-validation.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
||||||
cache: [false, true]
|
cache: [false, true]
|
||||||
go: [1.20.1]
|
go: [1.20.1]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: 'Setup ${{ matrix.cache }}, cache: ${{ matrix.go }}'
|
- name: 'Setup ${{ matrix.cache }}, cache: ${{ matrix.go }}'
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -88,7 +88,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
cache: [false, true]
|
cache: [false, true]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: 'Setup default go, cache: ${{ matrix.cache }}'
|
- name: 'Setup default go, cache: ${{ matrix.cache }}'
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -121,7 +121,7 @@ jobs:
|
||||||
cache: [false]
|
cache: [false]
|
||||||
go: [1.20.1]
|
go: [1.20.1]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
|
- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ See [action.yml](action.yml).
|
||||||
|
|
||||||
<!-- start usage -->
|
<!-- start usage -->
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
# Version or version range of Go to use
|
# Version or version range of Go to use
|
||||||
go-version: '1.23'
|
go-version: '1.23'
|
||||||
|
|
@ -70,8 +70,8 @@ See [action.yml](action.yml).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25' # The Go version to download (if necessary) and use.
|
go-version: '1.25' # The Go version to download (if necessary) and use.
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ For repeatable builds, specify the **exact major, minor, and patch version** (su
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25.5'
|
go-version: '1.25.5'
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
|
|
@ -36,8 +36,8 @@ You can specify **only a major and minor version** if you are okay with the most
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
|
|
@ -53,8 +53,8 @@ Download and use beta or RC Go versions as needed.
|
||||||
```yaml
|
```yaml
|
||||||
# RC version
|
# RC version
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25.0-rc.2'
|
go-version: '1.25.0-rc.2'
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -63,8 +63,8 @@ steps:
|
||||||
```yaml
|
```yaml
|
||||||
# Beta version
|
# Beta version
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.19.0-beta.1'
|
go-version: '1.19.0-beta.1'
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -80,8 +80,8 @@ If `oldstable` is provided, the action resolves it to the latest patch release o
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: 'stable'
|
go-version: 'stable'
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
|
|
@ -89,8 +89,8 @@ steps:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: 'oldstable'
|
go-version: 'oldstable'
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
|
|
@ -100,8 +100,8 @@ You can also use **SemVer's version range syntax**, for instance:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '^1.25.1'
|
go-version: '^1.25.1'
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -109,8 +109,8 @@ steps:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.24.0-rc.1'
|
go-version: '>=1.24.0-rc.1'
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -129,9 +129,9 @@ jobs:
|
||||||
go: [ '1.24', '1.25' ]
|
go: [ '1.24', '1.25' ]
|
||||||
name: Go ${{ matrix.go }} sample
|
name: Go ${{ matrix.go }} sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
|
|
@ -154,9 +154,9 @@ jobs:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
go: '1.25'
|
go: '1.25'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
|
|
@ -170,8 +170,8 @@ If both the `go-version` and the `go-version-file` inputs are provided then the
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version-file: 'path/to/go.mod' # Read Go version from go.mod
|
go-version-file: 'path/to/go.mod' # Read Go version from go.mod
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -187,8 +187,8 @@ steps:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version-file: '.go-version' # Read Go version from .go-version
|
go-version-file: '.go-version' # Read Go version from .go-version
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -196,8 +196,8 @@ steps:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version-file: '.tool-versions' # Read Go version from .tool-versions
|
go-version-file: '.tool-versions' # Read Go version from .tool-versions
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -205,8 +205,8 @@ steps:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.work' # Read Go version from go.work
|
go-version-file: 'go.work' # Read Go version from go.work
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -228,8 +228,8 @@ want the most up-to-date Go version to always be used. It supports major (e.g.,
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
@ -242,8 +242,8 @@ steps:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
cache-dependency-path: subdir/go.sum
|
cache-dependency-path: subdir/go.sum
|
||||||
|
|
@ -256,8 +256,8 @@ steps:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
cache-dependency-path: '**/go.sum'
|
cache-dependency-path: '**/go.sum'
|
||||||
|
|
@ -266,8 +266,8 @@ steps:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
|
|
@ -288,8 +288,8 @@ env:
|
||||||
steps:
|
steps:
|
||||||
- run: echo "$GOOS $GOARCH" > env.txt
|
- run: echo "$GOOS $GOARCH" > env.txt
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
|
|
@ -306,8 +306,8 @@ Besides dependencies, the action can also cache build outputs (the [`GOCACHE`](h
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
|
|
@ -328,10 +328,10 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
id: setup-go
|
id: setup-go
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25.5'
|
go-version: '1.25.5'
|
||||||
cache: false
|
cache: false
|
||||||
|
|
@ -394,8 +394,8 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
id: go124
|
id: go124
|
||||||
with:
|
with:
|
||||||
go-version: '^1.24'
|
go-version: '^1.24'
|
||||||
|
|
@ -411,8 +411,8 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
id: go124
|
id: go124
|
||||||
with:
|
with:
|
||||||
go-version: '1.24'
|
go-version: '1.24'
|
||||||
|
|
@ -430,8 +430,8 @@ When a custom base URL is provided, the action skips the `actions/go-versions` m
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
go-download-base-url: 'https://aka.ms/golang/release/latest'
|
go-download-base-url: 'https://aka.ms/golang/release/latest'
|
||||||
|
|
@ -445,8 +445,8 @@ env:
|
||||||
GO_DOWNLOAD_BASE_URL: 'https://aka.ms/golang/release/latest'
|
GO_DOWNLOAD_BASE_URL: 'https://aka.ms/golang/release/latest'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
@ -462,8 +462,8 @@ If your custom download source requires authentication, the `token` input is for
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
go-download-base-url: 'https://private-mirror.example.com/golang'
|
go-download-base-url: 'https://private-mirror.example.com/golang'
|
||||||
|
|
@ -485,7 +485,7 @@ If that fails as well the action will try to download versions directly from [go
|
||||||
If that fails as well you can get a higher rate limit with [generating a personal access token on github.com](https://github.com/settings/tokens/new) and passing it as the `token` input to the action:
|
If that fails as well you can get a higher rate limit with [generating a personal access token on github.com](https://github.com/settings/tokens/new) and passing it as the `token` input to the action:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue