Skip to content

Commit

Permalink
Set Actions Go version from go.mod (#849)
Browse files Browse the repository at this point in the history
The `.palantir/go-version` file is no longer supported, so always build
with the latest patch release of the version specified in `go.mod`.
  • Loading branch information
bluekeyes authored Sep 26, 2024
1 parent 4ec816a commit cbf7935
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set Go version
id: go_version
run: |
GO_VERSION=$(cat .palantir/go-version | sed 's/^go//' )
GO_VERSION=$(sed -E -n '/^go / s/^go ([0-9]+\.[0-9]+)(\.[0-9]+)?$/\1/p' < go.mod)
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT
- name: Set up Go
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Set Go version
id: go_version
run: |
GO_VERSION=$(cat .palantir/go-version | sed 's/^go//' )
GO_VERSION=$(sed -E -n '/^go / s/^go ([0-9]+\.[0-9]+)(\.[0-9]+)?$/\1/p' < go.mod)
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT
- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set Go version
id: go_version
run: |
GO_VERSION=$(cat .palantir/go-version | sed 's/^go//' )
GO_VERSION=$(sed -E -n '/^go / s/^go ([0-9]+\.[0-9]+)(\.[0-9]+)?$/\1/p' < go.mod)
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT
- name: Set up Go
Expand Down

0 comments on commit cbf7935

Please sign in to comment.