Fix constant helmrelese updates (#1011) #34
Workflow file for this run
This file contains 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 KCM | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set version | |
run: | | |
TAG=${{ github.ref_name }} | |
echo "VERSION=${TAG#v}" >> $GITHUB_ENV | |
- name: Set up Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GHCR | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push KCM controller image | |
uses: docker/build-push-action@v6 | |
with: | |
build-args: | | |
LD_FLAGS=-s -w -X github.com/K0rdent/kcm/internal/build.Version=${{ env.VERSION }} -X github.com/K0rdent/kcm/internal/telemetry.segmentToken=${{ secrets.SEGMENT_TOKEN }} | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ghcr.io/k0rdent/kcm/controller:${{ env.VERSION }} | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Prepare KCM chart | |
run: VERSION="${{ env.VERSION }}" make kcm-chart-release | |
- name: Push charts to GHCR | |
run: REGISTRY_REPO="oci://ghcr.io/k0rdent/kcm/charts" make helm-push | |
- name: Prepare manifests | |
run: make kcm-dist-release | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
prerelease: ${{ contains(env.VERSION, '-') }} | |
files: | | |
dist/install.yaml | |
templates/provider/kcm-templates/files/release.yaml | |
draft: true |