Skip to content

k8s: adding a helm chart #58

k8s: adding a helm chart

k8s: adding a helm chart #58

Workflow file for this run

name: release
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
env:
IMAGE: ghcr.io/grampelberg/kuberift
concurrency:
group: |-
release-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
uses: ./.github/workflows/check.yml
build:
permissions:
packages: write
uses: ./.github/workflows/build.yml
# merge:
# runs-on: ubuntu-latest
# permissions:
# packages: write
# needs:
# - build
# steps:
# - uses: actions/checkout@v4
# - name: fetch digests
# uses: actions/download-artifact@v4
# with:
# path: /tmp/digests
# pattern: digests-*
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: buildx
# uses: docker/setup-buildx-action@v3
# - name: meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: |
# ${{ env.IMAGE }}
# tags: |
# type=ref,event=tag
# type=raw,value=unstable,enable={{is_default_branch}}
# type=sha
# - name: login
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - uses: taiki-e/install-action@just
# - name: extract binary
# run: just extract-from-digests
# - uses: actions/upload-artifact@v4
# if: ${{ github.event_name != 'pull_request' }}
# with:
# name: kuberift-docker-binaries
# path: /tmp/bins/*
# retention-days: 1
# - name: push image
# working-directory: /tmp/digests
# run: |
# cp */* .
# rm -rf digests-*
# docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
# $(printf '${{ env.IMAGE }}@sha256:%s ' *)
# - name: inspect image
# run: |
# docker buildx imagetools inspect ${{ env.IMAGE }}:${{ steps.meta.outputs.version }}
helm:
runs-on: ubuntu-latest
needs:
- build
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
experimental: true
mise_toml: |
[tools]
helm = "latest"
just = "latest"
- uses: actions/download-artifact@v4
with:
path: /tmp/chart
name: helm
- name: upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: just helm-upload
release:
runs-on: ubuntu-latest
needs:
- check
# - merge
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
path: /tmp/binaries
pattern: kuberift-*
merge-multiple: true
- uses: actions/download-artifact@v4
with:
path: /tmp/chart
name: helm
- uses: taiki-e/install-action@v2
with:
tool: git-cliff
- name: changelog
run: git cliff -o CHANGELOG.md -l
- name: versioned release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: CHANGELOG.md
files: |-
/tmp/binaries/*
- name: unstable release
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/main'
with:
body_path: CHANGELOG.md
name: unstable
prerelease: true
tag_name: unstable
files: |-
/tmp/binaries/*
/tmp/chart/*
- name: do not commit
uses: softprops/action-gh-release@v2
with:
body_path: CHANGELOG.md
name: testing
prerelease: true
tag_name: testing
files: |-
/tmp/binaries/*
/tmp/chart/*