Commit graph

318 commits

Author SHA1 Message Date
Matthew Hughes
763ffebcce Configure environment to avoid toolchain installs
Force `go` to always use the local toolchain (i.e. the one the one that
shipped with the go command being run) via setting the `GOTOOLCHAIN`
environment variable to `local`[1]:

> When GOTOOLCHAIN is set to local, the go command always runs the
bundled Go toolchain.

This is how things are setup in the official Docker images (e.g.[2], see
also the discussion around that change[3]). The motivation behind this
is to:

* Reduce duplicate work, the action will install a version of Go, a
  toolchain will be detected, the toolchain will be detected and then
  another version of Go installed
* Avoid Unexpected behaviour: if you specify this action runs with some Go
  version (e.g. `1.21.0`) but your go.mod contains a `toolchain` or `go`
  directive for a newer version (e.g. `1.22.0`) then, without any other
  configuration/environment setup, any go commands will be run using go
  `1.22.0`
* TODO: link image

This will be a **breaking change** for some workflows. Given a `go.mod`
like:

    module proj

    go 1.22.0

Then running any `go` command, e.g. `go mod tidy`, in an environment
where only go versions before `1.22.0` were installed would previously
trigger a toolchain download of Go `1.22.0` and that version being used
to execute the command. With this change the above would error out with
something like:

> go: go.mod requires go >= 1.22.0 (running go 1.21.7;
GOTOOLCHAIN=local)

[1] https://go.dev/doc/toolchain#select
[2] dae3405a32/Dockerfile-linux.template (L163)
[3] https://github.com/docker-library/golang/issues/472
2024-10-14 19:46:15 +01:00
Joel Ambass
d60b41a563
Merge pull request #502 from actions/Jcambass-patch-1
Some checks failed
Validate 'setup-go' / check-latest (1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.21, windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (windows-latest) (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 windows-latest (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, windows-latest) (push) Has been cancelled
Validate Windows installation / Validate if symlink is created (push) Has been cancelled
Validate Windows installation / Find default go version (push) Has been cancelled
Validate Windows installation / Validate if hostedtoolcache works as expected (push) Has been cancelled
Validate Windows installation / Validate if symlink is not created for default go (push) Has been cancelled
Upgrade IA Publish
2024-09-26 08:24:19 +02:00
Joel Ambass
e09f57f6a9
Upgrade IA Publish 2024-09-16 17:20:25 +02:00
Joel Ambass
df1a11710e
Merge pull request #500 from actions/Jcambass-patch-1
Some checks failed
Validate 'setup-go' / check-latest (1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / check-latest (1.21, windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (windows-latest) (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 windows-latest (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, windows-latest) (push) Has been cancelled
Validate Windows installation / Validate if symlink is created (push) Has been cancelled
Validate Windows installation / Find default go version (push) Has been cancelled
Validate Windows installation / Validate if hostedtoolcache works as expected (push) Has been cancelled
Validate Windows installation / Validate if symlink is not created for default go (push) Has been cancelled
Add workflow file for publishing releases to immutable action package
2024-09-11 10:48:12 +02:00
Joel Ambass
49582f6476
Add workflow file for publishing releases to immutable action package
This workflow file publishes new action releases to the immutable action package of the same name as this repo.

This is part of the Immutable Actions project which is not yet fully released to the public. First party actions like this one are part of our initial testing of this feature.
2024-09-11 10:43:06 +02:00
Zxilly
b26d40294f
fix: add arch to cache key (#493)
Some checks failed
Validate 'setup-go' / go-version-file (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file (windows-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (macos-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / go-version-file-with-gowork (windows-latest) (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.20.14 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21.10 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.22.3 windows-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 macos-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 ubuntu-latest (push) Has been cancelled
Validate 'setup-go' / Setup 1.21 windows-latest (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.20.14, windows-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, macos-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, ubuntu-latest) (push) Has been cancelled
Validate 'setup-go' / architecture (1.21, windows-latest) (push) Has been cancelled
Validate Windows installation / Validate if symlink is created (false, 1.20.1) (push) Has been cancelled
Validate Windows installation / Validate if symlink is created (true, 1.20.1) (push) Has been cancelled
Validate Windows installation / Find default go version (push) Has been cancelled
Validate Windows installation / Validate if hostedtoolcache works as expected (false, 1.20.1) (push) Has been cancelled
Validate Windows installation / Validate if symlink is not created for default go (false) (push) Has been cancelled
Validate Windows installation / Validate if symlink is not created for default go (true) (push) Has been cancelled
2024-08-26 15:19:57 -05:00
dependabot[bot]
0a12ed9d6a
Bump braces from 3.0.2 to 3.0.3 (#487)
* Bump braces from 3.0.2 to 3.0.3

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

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

* Bump undici from 5.28.3 to 5.28.4

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
2024-06-27 13:16:26 -05:00
HarithaVattikuti
4ab57d7ea2
Fix versions check failure (#479)
* Update to latest Go versions

* Updated versions

* Update test data

* Update test data
2024-05-10 11:25:20 -05:00
Masahiro Furudate
cdcb360436
Remove the description of the old go.mod specification (#458)
* Fix emoji rendering

* Fix quoting

* Remove the description of the old go.mod specification

* Remove the single quotes from `go-version-file`

* Fix README

* Add description about patch versions to README

* Revert "Remove the single quotes from `go-version-file`"

This reverts commit ca4321abee.
2024-04-18 08:33:57 -05:00
Andy Brody
99176a8f9a
Update README.md with V5 release notes (#459) 2024-04-15 09:19:11 -05:00
dependabot[bot]
be1aa1186e
Bump undici from 5.28.2 to 5.28.3 (#465)
* Bump undici from 5.28.2 to 5.28.3

Bumps [undici](https://github.com/nodejs/undici) from 5.28.2 to 5.28.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.2...v5.28.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

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

* fixed check failures and update dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
2024-03-21 15:04:22 -05:00
Rui Chen
6c1fd22b67
docs: bump actions/setup-go to v5 (#449)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-01-29 10:18:45 -06:00
Dmitry Shibanov
0c52d547c9
Update dependencies for node20 (#445) 2023-12-05 17:50:42 +01:00
Marko Zivic
bfd2fb341f
Merge pull request #421 from chenrui333/node20-runtime
feat: upgrade to use node 20 runtime and bump checkout action to v4
2023-09-18 06:44:16 +02:00
Rui Chen
3d65fa57fc
feat: bump to use actions/checkout@v4
Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-09-05 11:42:39 -04:00
Rui Chen
8a505c9cf2
feat: bump to use node20 runtime
Signed-off-by: Rui Chen <rui@chenrui.dev>
2023-09-04 14:19:48 -04:00
Marko Zivic
883490dfd0
Merge pull request #417 from artemgavrilov/main
Improve documentation regarding dependencies caching
2023-08-30 09:35:35 +02:00
Artem Gavrilov
d45ebba0ce
Rephrase sentence
Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com>
2023-08-29 15:43:02 +02:00
Artem Gavrilov
317c6617fa
Replace wildcards term with globs. 2023-08-28 12:47:43 +02:00
Artem Gavrilov
f90673ad64
Merge pull request #1 from artemgavrilov/caching-docs-improvement
Improve documentation regarding dependencies caching
2023-08-25 12:37:15 +02:00
Artem Gavrilov
8018234347
Improve documentation regarding dependencies cachin 2023-08-25 12:31:19 +02:00
Marko Zivic
d085b4fe57
Merge pull request #411 from galargh/fix/windows-hostedtoolcache
Fix hosted tool cache usage on windows
2023-08-24 10:20:54 +02:00
galargh
48ac8fd236 chore: format 2023-08-12 23:57:09 +02:00
Piotr Galar
89a192af9d fix: sync .complete marker when caching tools on windows 2023-08-12 23:52:21 +02:00
Piotr Galar
aabcd82874
ci: add hostedtoolcache validation on windows 2023-08-12 21:56:36 +02:00
Sergey Dolin
93397bea11
Fix Install on Windows is very slow (#393)
* Fix Install on Windows is very slow

* Add unit test

* Improve readability

* Add e2e test

* fix lint

* Fix unit tests

* Fix unit tests

* limit to github hosted runners

* test hosted version of go

* AzDev environment

* rename lnkSrc

* refactor conditions

* improve tests

* refactoring

* Fix e2e test

* improve isHosted readability
2023-08-03 14:33:56 +02:00
Sergey Dolin
27eec5b982
Merge pull request #396 from actions/dependabot/npm_and_yarn/semver-6.3.1
Bump semver from 6.3.0 to 6.3.1
2023-08-02 23:29:18 +02:00
Sergey Dolin
ecfc77a56f
Merge pull request #397 from actions/dependabot/npm_and_yarn/word-wrap-1.2.4
Bump word-wrap from 1.2.3 to 1.2.4
2023-08-02 23:29:08 +02:00
dependabot[bot]
1b80a11e05
Bump word-wrap from 1.2.3 to 1.2.4
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 21:26:12 +00:00
Dusan Trickovic
b1c343484c Fix licensing for Semver 6.3.1 2023-07-18 16:46:59 +02:00
Dusan Trickovic
0bb97b1c5c Rebuild after updating Semver 2023-07-18 16:39:08 +02:00
dependabot[bot]
4220624b80
Bump semver from 6.3.0 to 6.3.1
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 09:42:07 +00:00
dependabot[bot]
db8764c1e2
Bump tough-cookie and @azure/ms-rest-js (#392) 2023-07-17 11:40:59 +02:00
Sergey Dolin
08b314a573
Merge pull request #383 from akv-platform/issue-368
Add imageOS to primaryKey
2023-07-11 09:44:30 +02:00
Sergey Dolin
4e0b6c77c6 Limit to Linux only 2023-07-10 10:39:55 +02:00
Sergey Dolin
a4d10f0ea4 Add imageOS to primaryKey
https://github.com/actions/setup-go/issues/368
2023-07-10 10:17:28 +02:00
Dmitry Shibanov
992f068900
Add note about YAML parsing versions (#382) 2023-06-08 15:37:31 +02:00
yukyan
0e6baa5a93
Added a description that go-version should be specified as a string type (#367) 2023-06-05 13:06:05 +02:00
Michael Kelly
a6259e5d50
Update action.yml (#379)
Typo in the description.
2023-06-05 13:01:40 +02:00
Marko Zivic
49bc3307c5
Merge pull request #378 from akv-platform/remove-implicit-dependencies
Remove implicit dependencies
2023-05-24 08:36:50 +02:00
Nikolai Laevskii
f350b3e5db Move eslint-plugin-node to dev dependencies 2023-05-23 11:58:05 +02:00
Nikolai Laevskii
06a11aedec Install eslint-plugin-node 2023-05-23 11:42:25 +02:00
github-actions[bot]
56b159bb76 Update configuration files 2023-05-23 08:32:03 +00:00
Nikolai Laevskii
fac708d667
Bump @actions/cache dependency to v3.2.1 (#374) 2023-05-08 11:42:39 +02:00
Dmitry Shibanov
dd84a9531a
Update xml2js (#370) 2023-04-20 14:28:58 +02:00
Ivan
41c2024c46
Fix glob bug in package.json scripts section (#359) 2023-04-03 12:46:31 +02:00
Sergey Dolin
8dbf352f06
update README fo v4 (#354) 2023-03-15 15:27:29 +01:00
github-actions[bot]
4d34df0c23
Update configuration files (#348)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-15 00:26:55 +01:00
Dmitry Shibanov
fdc0d672a1
Add Go bin if go-version input is empty (#351) 2023-03-14 16:29:10 +01:00
Dmitry Shibanov
ebfdf6ac95
add warning if go-version is empty (#350) 2023-03-14 16:07:41 +01:00