Skip to content

Commit

Permalink
explore parsing go version from a run step
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Feb 13, 2024
1 parent de59c66 commit eda85f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: parse-go-version
run:
echo "version=$(cat go.mod | grep '^go \d*\.\d*$' | awk '{print $2}')" > "${GITHUB_OUTPUT}"

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ if steps.parse-go-version.outputs.version }}

- name: Test
run: go test -v ./...

0 comments on commit eda85f8

Please sign in to comment.