Release container images to ghcr.io #12
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 | |
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 }} |