Skip to content

Commit

Permalink
Use GITHUB_WORKSPACE to install krew
Browse files Browse the repository at this point in the history
Signed-off-by: jnjerin <[email protected]>
  • Loading branch information
jnjerin committed Nov 17, 2023
1 parent 177a3da commit 9541075
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/test-kubectl-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
steps:
- name: Set up Krew for kubectl and Helm
env:
KREW_HOME: $HOME/.krew
KREW_ROOT: $HOME/.krew
KREW_HOME: $GITHUB_WORKSPACE/.krew
KREW_ROOT: $GITHUB_WORKSPACE/.krew
run: |
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
Expand All @@ -28,14 +28,14 @@ jobs:
./"${KREW}" install krew
# Export PATH to a file
echo "export PATH=${KREW_ROOT:-$HOME/.krew}/bin:$PATH" >> $HOME/krew-path
#echo "export PATH=${KREW_ROOT:-$HOME/.krew}/bin:$PATH" >> $HOME/krew-path
echo "export PATH=${KREW_ROOT:-$GITHUB_WORKSPACE/.krew}/bin:$PATH" >> $GITHUB_ENV
echo "export PATH=${KREW_ROOT:-$GITHUB_WORKSPACE/.krew}/bin:$PATH" >> $GITHUB_WORKSPACE/krew-path
# Print information for debugging
ls -lh
ls -lh ./"$KREW"
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
echo "export PATH=${KREW_ROOT:-$HOME/.krew}/bin:$PATH" >> $GITHUB_ENV
echo "$KREW_HOME"
echo "${KREW}"
Expand All @@ -55,12 +55,12 @@ jobs:
env:
IMAGE: hlf-operator
TAG: test
KREW_HOME: $HOME/.krew
KREW_ROOT: $HOME/.krew
KREW_HOME: $GITHUB_WORKSPACE/.krew
KREW_ROOT: $GITHUB_WORKSPACE/.krew
steps:
- name: Load Krew path
run: |
source $HOME/krew-path
source $GITHUB_WORKSPACE/krew-path
- name: Install Go
uses: actions/setup-go@v2
with:
Expand Down

0 comments on commit 9541075

Please sign in to comment.