Skip to content

Commit c00dc18

Browse files
Merge pull request #578 from stacklok/update-img-build-cmd
Add build-arg in `make image-build` command
2 parents 7e2f1e8 + 0791950 commit c00dc18

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/image-build.yml

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,5 @@ jobs:
3535
load: true
3636
cache-from: type=gha
3737
cache-to: type=gha,mode=max
38-
secrets: |
39-
gh_token=${{ secrets.GH_CI_TOKEN }}
4038
build-args: |
4139
LATEST_RELEASE=${{ env.LATEST_RELEASE }}

.github/workflows/image-publish.yml

-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ jobs:
8585
labels: ${{ steps.docker-metadata.outputs.labels }}
8686
cache-from: type=gha
8787
cache-to: type=gha,mode=max
88-
secrets: |
89-
gh_token=${{ secrets.GH_CI_TOKEN }}
9088
build-args: |
9189
LATEST_RELEASE=${{ env.LATEST_RELEASE }}
9290
- name: Capture Image Digest

Makefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: clean install format lint test security build all
22
CONTAINER_BUILD?=docker buildx build
3-
VER?=0.1.0
3+
VER?=0.1.7
44

55
clean:
66
rm -rf build/
@@ -30,6 +30,12 @@ build: clean test
3030
poetry build
3131

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

3541
all: clean install format lint test security build

0 commit comments

Comments
 (0)