-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup: Add repo-local action for golang setup
- Loading branch information
Showing
3 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This action targets setup-go@v3 to support workers with old NodeJS | ||
# incompabible with newer versions of setup-go. | ||
# | ||
# Since github actions do not support dynamically configuring the | ||
# versions in a uses statement (e.g. `actions/setup-go@${{ var }}`) it | ||
# is necessary to define an action per version rather than one action | ||
# that can be parameterized. | ||
# | ||
# Must be run after actions/checkout to ensure go.mod is available to | ||
# source the desired go version from. | ||
|
||
name: 'Install Go toolchain with project defaults' | ||
description: 'Install a go toolchain with project defaults' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set the project Go version in the environment | ||
run: .github/workflows/go_version_env.sh >> $GITHUB_ENV | ||
shell: bash | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '${{ env.GO_VERSION }}' | ||
check-latest: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This action targets the project default version of setup-go. For | ||
# workers with old NodeJS incompabible with newer versions of | ||
# setup-go, try setup-go-for-project-v3. | ||
# | ||
# Since github actions do not support dynamically configuring the | ||
# versions in a uses statement (e.g. `actions/setup-go@${{ var }}`) it | ||
# is necessary to define an action per version rather than one action | ||
# that can be parameterized. | ||
# | ||
# Must be run after actions/checkout to ensure go.mod is available to | ||
# source the desired go version from. | ||
|
||
name: 'Install Go toolchain with project defaults' | ||
description: 'Install a go toolchain with project defaults' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set the project Go version in the environment | ||
run: .github/workflows/go_version_env.sh >> $GITHUB_ENV | ||
shell: bash | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '${{ env.GO_VERSION }}' | ||
check-latest: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters