Skip to content

v0.4.0

v0.4.0 #1

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
image_version:
description: 'image version for image build'
required: false
type: string
release:
types:
- created
env:
IMAGE_NAME: kite
GO_VERSION: "1.24.3"
NODE_VERSION: "24"
jobs:
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'zxh326' }}
permissions:
packages: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: ui/pnpm-lock.yaml
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Install deps
run: make deps
- name: Build
run: make cross-compile
- name: Check version
id: check_version
run: |
if [ ${{ inputs.image_version }} ]; then
IMAGE_TAG=${{ inputs.image_version }}
else
IMAGE_TAG=$(git describe --tags --match 'v*' | grep -oE 'v[0-9]+\.[0-9][0-9]*(\.[0-9]+)?')
fi
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.binary
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
labels: runnumber=${{ github.run_id }}
# - name: Package binaries
# run: make package-binaries
# - name: Upload binary packages to release
# run: |
# echo "Uploading all kite binary packages..."
# gh release upload ${{ github.event.release.tag_name }} bin/kite-*-${{ github.event.release.tag_name }}.tar.gz --clobber
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}