Compare commits

...
7 Commits
Author SHA1 Message Date
dependabot[bot]andAparna Jyothi 7a3fe6cf4c Bump qs from 6.14.0 to 6.14.1 (#703)
* Bump qs from 6.11.2 to 6.14.1

Bumps [qs](https://github.com/ljharb/qs) from 6.11.2 to 6.14.1.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.11.2...v6.14.1)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* package.json version update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2026-01-12 20:41:32 -06:00
dependabot[bot] b9adafd441 Bump actions/checkout from 5 to 6 (#686)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 20:37:59 -06:00
Andreas Deininger d73f6bcfc2 README.md: correct to actions/checkout@v6 (#683) 2026-01-12 13:52:41 -06:00
Salman ChishtiandAparna Jyothi ae252ee6fb Bump @actions/cache to v5 (#695)
* Bump @actions/cache to version 5.0.0 in package.json and package-lock.json

* Bump @actions/cache to v5

* prepease release 6.0.1

* Bump @actions/cache to v5.0.1

- Resolves punycode deprecation warning
- Updates licensed cache metadata

* upgrade actions/cache to 5.0.1

---------

Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
2026-01-07 10:40:06 -06:00
dependabot[bot] bf7446afaf Bump js-yaml from 3.14.1 to 3.14.2 (#682)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-07 10:36:25 -06:00
ccoVeille 02aadfee7f Fix Node.js version in action.yml (#691)
It looks like the Node.js version specified in action.yml was left behind
when we upgraded the project to Node.js 24. This commit updates action.yml
to reflect the correct Node.js version.
2026-01-07 09:26:13 -06:00
aparnajyothi-y 4aaadf4266 Example for restore-only cache in documentation (#696)
* cache-restore-only example

* resolve conflicts

* example update

* format update

* format update

* update
2025-12-17 21:18:55 -06:00
79 changed files with 98076 additions and 104054 deletions

No files matched your search

@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checking out
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Publish
id: publish
uses: actions/publish-immutable-action@v0.0.4
+12 -12
View File
@@ -20,7 +20,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go Stable
uses: ./
with:
@@ -35,7 +35,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go oldStable
uses: ./
with:
@@ -57,7 +57,7 @@ jobs:
- os: macos-latest-large
architecture: x32
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go ${{ matrix.version }} ${{ matrix.architecture }}
uses: ./
with:
@@ -82,7 +82,7 @@ jobs:
go: 1.23.2
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: setup-go ${{ matrix.go }}
uses: ./
@@ -101,7 +101,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
go-version: ['1.20', '1.21', '1.22', '1.23']
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go and check latest
uses: ./
with:
@@ -117,7 +117,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go and check latest
uses: ./
with:
@@ -133,7 +133,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go and check latest
uses: ./
with:
@@ -149,7 +149,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go and check latest
uses: ./
with:
@@ -165,7 +165,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-large]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go from .go-version file
uses: ./
with:
@@ -183,7 +183,7 @@ jobs:
go: [1.20.14, 1.21.10, 1.22.8, 1.23.2]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: setup-go ${{ matrix.go }}
uses: ./
@@ -203,7 +203,7 @@ jobs:
go: [1.11.12]
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: setup-go ${{ matrix.go }}
uses: ./
@@ -231,7 +231,7 @@ jobs:
- os: macos-latest-large
architecture: x64
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Setup Go and check latest
uses: ./
with:
+3 -3
View File
@@ -19,7 +19,7 @@ jobs:
cache: [false, true]
go: [1.20.1]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: 'Setup ${{ matrix.cache }}, cache: ${{ matrix.go }}'
uses: ./
@@ -88,7 +88,7 @@ jobs:
matrix:
cache: [false, true]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: 'Setup default go, cache: ${{ matrix.cache }}'
uses: ./
@@ -121,7 +121,7 @@ jobs:
cache: [false]
go: [1.20.1]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
uses: ./
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+81 -19
View File
@@ -13,7 +13,7 @@ This action sets up a Go environment for use in GitHub Actions by:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
@@ -67,7 +67,7 @@ To change the default behavior, use the `check-latest` input.
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
@@ -80,7 +80,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '^1.23.1' # The Go version to download (if necessary) and use.
@@ -89,7 +89,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '>=1.22.0'
@@ -107,7 +107,7 @@ steps:
```yaml
# RC version
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.24.0-rc.1' # The Go version to download (if necessary) and use
@@ -117,7 +117,7 @@ steps:
```yaml
# Beta version
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23.0-beta.1' # The Go version to download (if necessary) and use
@@ -131,7 +131,7 @@ steps:
If `stable` is provided, action will get the latest stable version from the [go-versions](https://github.com/actions/go-versions/blob/main/versions-manifest.json) repository manifest.
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable' # Latest stable version
@@ -143,7 +143,7 @@ steps:
If `oldstable` is provided, when the current release is 1.23.x, the action will resolve version as 1.22.x, where x is the latest patch release.
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'oldstable' # Previous stable version
@@ -164,7 +164,7 @@ Automatically detect the Go version from your project's `go.mod` file:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
@@ -182,7 +182,7 @@ Use the Go version specified in your `go.work` file:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'go.work'
@@ -195,7 +195,7 @@ Read the Go version from a `.go-version` file:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: '.go-version'
@@ -208,7 +208,7 @@ Use the Go version from an [`.tool-versions`](https://asdf-vm.com/manage/configu
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: '.tool-versions'
@@ -221,7 +221,7 @@ The action searches for version files relative to the repository root by default
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: 'path/to/.go-version'
@@ -239,7 +239,7 @@ When `check-latest: true`, the action verifies if your cached Go version is the
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
@@ -261,7 +261,7 @@ Default behavior: Searches for `go.sum` in the repository root and uses its hash
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
@@ -280,7 +280,7 @@ For advanced scenarios, use `cache-dependency-path` to specify:
```yaml
# Example: Monorepo with multiple go.sum files
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
@@ -294,7 +294,7 @@ steps:
```yaml
# Example: Using glob patterns to match all go.sum files
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
@@ -306,7 +306,7 @@ steps:
```yaml
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.23'
@@ -316,6 +316,68 @@ steps:
> **Note**: If caching fails, the action logs a warning but continues execution without interrupting your workflow.
**Restore-Only Cache**
```yaml
# In some workflows, you may want to restore a cache without saving it. This can help reduce cache writes and storage usage in workflows that only need to read from cache
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: Setup Go
id: setup-go
uses: actions/setup-go@v6
with:
go-version: '1.24.10'
cache: false
# Capture Go cache locations
- name: Set Go cache variables (Linux/macOS)
if: runner.os != 'Windows'
run: |
echo "GO_MOD_CACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
echo "GO_BUILD_CACHE=$(go env GOCACHE)" >> $GITHUB_ENV
- name: Set Go cache variables (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
echo "GO_MOD_CACHE=$(go env GOMODCACHE)" | Out-File $env:GITHUB_ENV -Append
echo "GO_BUILD_CACHE=$(go env GOCACHE)" | Out-File $env:GITHUB_ENV -Append
# Normalize runner.arch to lowercase to ensure consistent cache keys
- name: Normalize runner architecture (Linux/macOS)
if: runner.os != 'Windows'
shell: bash
run: echo "ARCH=$(echo '${{ runner.arch }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Normalize runner architecture (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$arch = "${{ runner.arch }}".ToLower()
echo "ARCH=$arch" | Out-File $env:GITHUB_ENV -Append
- name: Set cache OS suffix for Linux
if: runner.os == 'Linux'
shell: bash
run: echo "CACHE_OS_SUFFIX=$ImageOS-" >> $GITHUB_ENV
- name: Restore Go cache
id: go-cache
uses: actions/cache/restore@v5
with:
path: |
${{ env.GO_MOD_CACHE }}
${{ env.GO_BUILD_CACHE }}
key: setup-go-${{ runner.os }}-${{ env.ARCH }}-${{ env.CACHE_OS_SUFFIX }}go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('**/go.sum') }}
- name: Download modules
run: go mod download
- name: Build
run: go build ./...
```
> If there are several builds on the same repo it might make sense to create a cache in one build and use it in the
others. The action [actions/cache/restore](https://github.com/actions/cache/tree/main/restore#only-restore-cache)
should be used in this case.
### Matrix Testing
Test across multiple Go versions:
@@ -328,7 +390,7 @@ jobs:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
+1 -1
View File
@@ -25,7 +25,7 @@ outputs:
cache-hit:
description: 'A boolean value to indicate if a cache was hit'
runs:
using: 'node20'
using: 'node24'
main: 'dist/setup/index.js'
post: 'dist/cache-save/index.js'
post-if: success()
+48663 -51216
View File
File diff suppressed because it is too large. Load diff
+47684 -51470
View File
File diff suppressed because it is too large. Load diff
+1629 -1330
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "setup-go",
"version": "6.0.0",
"version": "6.2.0",
"private": true,
"description": "setup go action",
"main": "lib/setup-go.js",
@@ -28,7 +28,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^4.0.3",
"@actions/cache": "^5.0.1",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/glob": "^0.5.0",