Skip to content

Commit

Permalink
Merge pull request #9 from honeycombio/dstrelau/gha-ko
Browse files Browse the repository at this point in the history
ci: Build via GHA+ko
  • Loading branch information
dstrelau committed Mar 2, 2023
2 parents c67b8a6 + 6f132f3 commit b8ec5fe
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 94 deletions.
92 changes: 0 additions & 92 deletions .circleci/config.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/ko.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Ko
on: [push, pull_request, create] # create is for tags

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-go@v2
with:
go-version: 1.20

- uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --timeout=5m

- run: make test

- uses: ko-build/setup-ko@v0.6
- if: github.ref_type == 'branch' && github.ref_name == 'main'
run: ko build -B
- if: github.ref_type == 'tag'
run: ko build -B --tags "latest,$(echo ${{ github.ref }} | cut -c11-)"

4 changes: 3 additions & 1 deletion .ko.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ builds:
- id: kspan
main: . # in Dockerfile, this was renamed /manager and made the entrypoint
flags:
# Flags taken from the Dockerfile
- -a # force rebuilding of packages already up-to-date
defaultPlatforms:
- linux/arm64
- linux/amd64
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Image URL to use all building/pushing image targets
IMG ?= honecyombio/kspan:dev
IMG ?= honeycombio/kspan:dev
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"

Expand Down

0 comments on commit b8ec5fe

Please sign in to comment.