chore(release): v2.1.1 (#59) #7
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: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - uses: docker/setup-buildx-action@v4 | |
| - uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/metadata-action@v6 | |
| id: meta | |
| with: | |
| images: ghcr.io/${{ github.repository }} | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| - uses: docker/build-push-action@v7 | |
| id: build | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64,linux/arm64 | |
| provenance: mode=max | |
| sbom: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - uses: sigstore/cosign-installer@v3 | |
| - name: Sign image (keyless cosign) | |
| run: | | |
| cosign sign --yes "ghcr.io/${{ github.repository }}@${{ steps.build.outputs.digest }}" | |
| - uses: anchore/sbom-action@v0 | |
| with: | |
| image: "ghcr.io/${{ github.repository }}@${{ steps.build.outputs.digest }}" | |
| artifact-name: sbom-${{ github.ref_name }}.spdx.json | |
| output-file: sbom-${{ github.ref_name }}.spdx.json | |
| - name: Publish Helm chart (OCI) | |
| run: | | |
| set -euo pipefail | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u "${{ github.actor }}" --password-stdin | |
| helm package charts/karpenter-provider-hetzner --version "$VERSION" --app-version "$VERSION" | |
| helm push "karpenter-provider-hetzner-${VERSION}.tgz" oci://ghcr.io/${{ github.repository_owner }}/charts |