Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Add build-arg in make image-build command #578

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ jobs:
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
secrets: |
gh_token=${{ secrets.GH_CI_TOKEN }}
build-args: |
LATEST_RELEASE=${{ env.LATEST_RELEASE }}
2 changes: 0 additions & 2 deletions .github/workflows/image-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ jobs:
labels: ${{ steps.docker-metadata.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
secrets: |
gh_token=${{ secrets.GH_CI_TOKEN }}
build-args: |
LATEST_RELEASE=${{ env.LATEST_RELEASE }}
- name: Capture Image Digest
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: clean install format lint test security build all
CONTAINER_BUILD?=docker buildx build
VER?=0.1.0
VER?=0.1.7

clean:
rm -rf build/
Expand Down Expand Up @@ -30,6 +30,12 @@ build: clean test
poetry build

image-build:
DOCKER_BUILDKIT=1 $(CONTAINER_BUILD) -f Dockerfile --secret id=gh_token,env=GH_CI_TOKEN -t codegate . -t ghcr.io/stacklok/codegate:$(VER) --load
DOCKER_BUILDKIT=1 $(CONTAINER_BUILD) \
-f Dockerfile \
--build-arg LATEST_RELEASE=$(curl -s "https://api.github.com/repos/stacklok/codegate-ui/releases/latest" | grep '"zipball_url":' | cut -d '"' -f 4) \
-t codegate \
. \
-t ghcr.io/stacklok/codegate:$(VER) \
--load

all: clean install format lint test security build
Loading