Skip to content

Commit

Permalink
fix: use go.mod for go version setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrabovcin committed Oct 14, 2024
1 parent c81cbd1 commit 62d3796
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
id: go
- name: Set up Go for root
run: |
sudo ln -sf `which go` `sudo which go` || true
sudo go version
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: get go version
run: go version
- name: Gofmt and License checks
Expand Down Expand Up @@ -77,19 +73,15 @@ jobs:
needs: build
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
id: go
- name: Set up Go for root
run: |
sudo ln -sf `which go` `sudo which go` || true
sudo go version
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-tags: true
- name: get go version
run: go version
- name: Login to GHCR
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/d2iq-relesae-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,18 @@ jobs:
contents: read
packages: write
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
id: go
- name: Set up Go for root
run: |
sudo ln -sf `which go` `sudo which go` || true
sudo go version
- name: get go version
run: go version
- name: Check out release tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.releaseTag }}
fetch-tags: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
id: go
- name: Login to GHCR
uses: docker/login-action@v3
with:
Expand Down

0 comments on commit 62d3796

Please sign in to comment.