Skip to content

Commit

Permalink
chore: Use Dockerfile as source for the Go version
Browse files Browse the repository at this point in the history
  • Loading branch information
zerok committed Jan 15, 2024
1 parent a1d5473 commit cc8a798
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: goversion
run: |
cat Dockerfile | awk '/^FROM golang:.* as build$/ {v=$2;split(v,a,":")}; END {printf("version=%s", a[2])}' >> $GITHUB_OUTPUT
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: "${{steps.goversion.outputs.version}}"
- run: make lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: goversion
run: |
cat Dockerfile | awk '/^FROM golang:.* as build$/ {v=$2;split(v,a,":")}; END {printf("version=%s", a[2])}' >> $GITHUB_OUTPUT
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: "${{steps.goversion.outputs.version}}"
- uses: azure/setup-helm@v3
with:
version: '3.13.1'
Expand All @@ -36,7 +42,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: goversion
run: |
cat Dockerfile | awk '/^FROM golang:.* as build$/ {v=$2;split(v,a,":")}; END {printf("version=%s", a[2])}' >> $GITHUB_OUTPUT
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: "${{steps.goversion.outputs.version}}"
- run: make cross

0 comments on commit cc8a798

Please sign in to comment.