Merge pull request #634 from rancher-sandbox/dependabot/go_modules/k8… #196
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Upload kubectl plugin | |
| on: | |
| workflow_call: | |
| inputs: | |
| version: | |
| type: string | |
| push: | |
| branches: | |
| - "main" | |
| jobs: | |
| upload-kubectl-plugin: | |
| name: Upload kubectl plugin | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: "go.mod" | |
| - name: Build kubectl plugin for all platforms | |
| run: make kubectl-plugin-cross | |
| - name: Upload plugin artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: kubectl-plugin | |
| path: bin/kubectl-plugin/ | |
| if-no-files-found: error | |
| retention-days: 7 |