Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Oct 19, 2022
1 parent 0102e6e commit 0eb8932
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ jobs:
id: commit
run: |
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Setup Golang Environment
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod
cache: true
- name: Determine GOPATH
run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
- name: Check if CRDs changed
Expand All @@ -70,7 +69,7 @@ jobs:
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: --rm-dist --debug --skip-publish --snapshot
args: build --snapshot --rm-dist --single-target
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPATH: ${{ env.GOPATH }}
Expand All @@ -86,12 +85,11 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Setup Golang Environment
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod
cache: true
- name: Run Tests
run: go test ./...

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ jobs:
go-version-file: go.mod
cache: true
- name: Determine GOPATH
id: go
run: echo "::set-output name=go_path::$(go env GOPATH)"
run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV

- uses: actions/setup-node@v3
- run: npm install js-yaml
Expand Down Expand Up @@ -89,7 +88,7 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOPATH: ${{ steps.go.outputs.go_path }}
GOPATH: ${{ env.GOPATH }}
- name: Store Artifacts in Cache
uses: actions/cache@v3
with:
Expand Down

0 comments on commit 0eb8932

Please sign in to comment.