Skip to content

Release container images to ghcr.io #12

Release container images to ghcr.io

Release container images to ghcr.io #12

Workflow file for this run

name: Release
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
release:
name: build and push to ghcr.io
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21.x
- uses: ko-build/[email protected]
- uses: actions/checkout@v4
- name: Build and push
env:
KO_DOCKER_REPO: ghcr.io/norbjd/k8s-pod-cpu-booster
run: |
TAG="$(TZ=UTC0 git log -1 --format=%cd --date=format-local:%Y%m%d%H%M)-$(git rev-parse --short HEAD)"
ko build ./cmd/informer ./cmd/webhook \
--base-import-paths \
--sbom=none \
--tags=$TAG,${{ github.ref_name }}