v0.0.1-alpha3 #3
Workflow file for this run
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: Release | |
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| inputs: | |
| tag_name: | |
| description: 'Name of the release (e.g., v1.2.3)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| env: | |
| TAG: ${{ github.event_name == 'release' && github.ref_name || inputs.tag_name }} | |
| jobs: | |
| release: | |
| name: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| ref: ${{ env.TAG }} | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Login to container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and Release | |
| env: | |
| IMG: ghcr.io/${{ github.repository_owner }}/cluster-api-k3k-controller:${{ env.TAG }} | |
| run: | | |
| make docker-build | |
| make docker-push | |
| make release | |
| - name: Upload assets | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload ${{ env.TAG }} out/* |