Skip to content

feat: helm chart

feat: helm chart #11

Workflow file for this run

name: CI Build and Deploy
on:
push:
permissions:
contents: read
packages: write
id-token: write
jobs:
build_app:
name: Build Go binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Create output dir
run: mkdir -p dist
- name: Build server (linux/amd64)
run: |
mkdir -p dist/linux/amd64
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./dist/linux/amd64/server.exe ./cmd/server
- name: Build server (linux/arm64)
run: |
mkdir -p dist/linux/arm64
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ./dist/linux/arm64/server.exe ./cmd/server
- name: Upload app binaries
uses: actions/upload-artifact@v6
with:
path: dist
name: dist
deploy_docker:
name: Prepare Docker context and build/push image
runs-on: ubuntu-latest
needs: [build_app]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout
uses: actions/checkout@v6
- name: Download frontend artifacts
uses: actions/download-artifact@v7
with:
name: dist
path: dist
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and (optionally) push image
uses: docker/build-push-action@v6
with:
context: .
file: dist.Dockerfile
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: |
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha
platforms: linux/amd64,linux/arm64