mirror of
https://github.com/actions/setup-go.git
synced 2026-04-12 07:20:04 +00:00
Update README for go.mod file references
This commit is contained in:
parent
a5f9b05d2d
commit
d67cd448bc
1 changed files with 7 additions and 7 deletions
14
README.md
14
README.md
|
|
@ -267,12 +267,12 @@ steps:
|
||||||
|
|
||||||
For advanced scenarios, use `cache-dependency-path` to specify:
|
For advanced scenarios, use `cache-dependency-path` to specify:
|
||||||
- **Multiple dependency files**: When your project has dependencies in different directories
|
- **Multiple dependency files**: When your project has dependencies in different directories
|
||||||
- **Custom locations**: When your `go.sum` files are not in the repository root
|
- **Custom locations**: When your `go.mod` files are not in the repository root
|
||||||
- **Monorepos**: When managing multiple Go modules in a single repository
|
- **Monorepos**: When managing multiple Go modules in a single repository
|
||||||
- **Glob patterns**: For flexible file matching
|
- **Glob patterns**: For flexible file matching
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example: Monorepo with multiple go.sum files
|
# Example: Monorepo with multiple go.mod files
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v6
|
||||||
|
|
@ -280,19 +280,19 @@ steps:
|
||||||
go-version: '1.23'
|
go-version: '1.23'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
subdir/go.sum
|
subdir/go.mod
|
||||||
tools/go.sum
|
tools/go.mod
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
```
|
```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example: Using glob patterns to match all go.sum files
|
# Example: Using glob patterns to match all go.mod files
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: '1.23'
|
go-version: '1.23'
|
||||||
cache-dependency-path: "**/*.sum"
|
cache-dependency-path: "**/*.mod"
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -433,7 +433,7 @@ For more information about semantic versioning, see the [semver documentation](h
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
# Path to dependency files for caching
|
# Path to dependency files for caching
|
||||||
cache-dependency-path: 'go.sum'
|
cache-dependency-path: 'go.mod'
|
||||||
|
|
||||||
# Architecture to install (auto-detected if not specified)
|
# Architecture to install (auto-detected if not specified)
|
||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue