Skip to content

Commit

Permalink
tune ko
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo Conforti committed Aug 16, 2024
1 parent 8668913 commit 414d94c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Image
env:
AUTH_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
KO_DOCKER_REPO: angeloxx/cilium-egress-observer
VERSION: latest
#AUTH_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# KO_DOCKER_REPO: angeloxx/cilium-egress-observer
#VERSION: latest
IMAGE_REGISTRY_NAMESPACE: angeloxx
IMAGE_REGISTRY: hub.docker.io
IMAGE_TAG_FORCED: latest
run: |
# echo "${AUTH_TOKEN}" | ko login hub.docker.io --username angeloxx --password-stdin
make build-image
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ ifneq ($(shell git status --porcelain),)
VERSION := $(VERSION)-dirty
endif

IMAGE_TAG := ${VERSION}
ifeq ($(IMAGE_TAG_FORCED),)
IMAGE_TAG := ${IMAGE_TAG_FORCED}
endif

IMAGE_REGISTRY_NAMESPACE ?= angeloxx
IMAGE_TAG_BASE ?= $(IMAGE_REGISTRY_NAMESPACE)/cilium-egress-observer
IMAGE_REGISTRY ?= docker.io
Expand Down Expand Up @@ -128,8 +133,7 @@ PLATFORMS ?= linux/arm64,linux/amd64
.PHONY: build-image
build-image: ko # vulncheck
KO_DOCKER_REPO=${IMAGE} \
VERSION=${VERSION} \
ko build --tags ${VERSION} --bare --sbom ${IMG_SBOM} \
ko build --tags ${IMAGE_TAG_FORCED} --bare --sbom ${IMG_SBOM} \
--image-label org.opencontainers.image.source="https://github.com/angeloxx/cilium-egress-observer" \
--image-label org.opencontainers.image.revision=$(shell git rev-parse HEAD) \
--platform=${PLATFORMS} --push=true .
Expand Down

0 comments on commit 414d94c

Please sign in to comment.