diff --git a/.github/workflows/external-plugin.yml b/.github/workflows/external-plugin.yml index 51627c5c744..8c8d7702cee 100644 --- a/.github/workflows/external-plugin.yml +++ b/.github/workflows/external-plugin.yml @@ -20,6 +20,9 @@ jobs: steps: - name: Clone the code uses: actions/checkout@v4 + with: + # Fetching only recent history to avoid .git permission issues + fetch-depth: 1 - name: Setup Go uses: actions/setup-go@v5 @@ -47,9 +50,10 @@ jobs: - name: Build Kubebuilder Binary run: | - make build - # Add the bin directory directly to the PATH - echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH + # Set kb_root_dir to avoid .git permissions issues + export kb_root_dir=$(pwd) + go build -o "${kb_root_dir}/bin/kubebuilder" ./cmd + echo "${kb_root_dir}/bin" >> $GITHUB_PATH - name: Run Kubebuilder Commands env: