Skip to content

Commit

Permalink
fix(deps): use Go version from Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Aug 18, 2021
1 parent 3f11901 commit 83103e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ jobs:
with:
token: ${{ secrets.API_GITHUB_TOKEN }}

- name: Fetch Go version
run: |
GO_VERSION=$(perl -ne 'print "$1\n" if /FROM golang:([0-9.]+)/' Dockerfile | head -n1)
[ -n "$GO_VERSION" ] || exit 1
echo "go_version=$GO_VERSION" >> $GITHUB_ENV
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: "1.16"
go-version: "${{ env.go_version }}"

- name: Binaries Release
uses: goreleaser/[email protected]
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ jobs:
if: github.event_name == 'pull_request'
uses: actions/[email protected]

- name: Fetch Go version
run: |
GO_VERSION=$(perl -ne 'print "$1\n" if /FROM golang:([0-9.]+)/' Dockerfile | head -n1)
[ -n "$GO_VERSION" ] || exit 1
echo "go_version=$GO_VERSION" >> $GITHUB_ENV
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: "1.16"
go-version: "${{ env.go_version }}"

- name: Program Test
run: go test ./...
Expand Down

0 comments on commit 83103e4

Please sign in to comment.