Skip to content

Commit

Permalink
add script to init workspace
Browse files Browse the repository at this point in the history
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
  • Loading branch information
sunjayBhatia committed Feb 2, 2024
1 parent ceefba0 commit 61e45b9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/label_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
with:
go-version: 'stable'
cache: false
- name: Init go workspace
run: ./hack/init-go-workspace.sh
- run: go run ./hack/cmd/check-changefile-exists/main.go
env:
PR_NUMBER: ${{ github.event.number }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/prbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: Init go workspace
run: ./hack/init-go-workspace.sh
- name: add deps to path
run: |
./hack/actions/install-kubernetes-toolchain.sh $GITHUB_WORKSPACE/bin
Expand Down
14 changes: 14 additions & 0 deletions hack/init-go-workspace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

readonly HERE=$(cd "$(dirname "$0")" && pwd)
readonly REPO=$(cd "${HERE}/.." && pwd)

cd "${REPO}"

go work init
go work use .
go work use ./hack

0 comments on commit 61e45b9

Please sign in to comment.