Skip to content

Commit

Permalink
feat(build): add a step to build docker for dev purposes (#29)
Browse files Browse the repository at this point in the history
This will allow to run in CI and do extra steps, e.g. security
  • Loading branch information
alexfalkowski authored Nov 7, 2023
1 parent 8b4d9d8 commit 5dadc44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build/docker/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

# Build docker.
docker build --build-arg version="latest" -t alexfalkowski/"$1" .
8 changes: 6 additions & 2 deletions build/make/service.mak
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ build:
build-test:
go test -race -ldflags="-X 'github.com/alexfalkowski/$(NAME)/cmd.Version=latest'" -mod vendor -c -tags features -covermode=atomic -o $(NAME) -coverpkg=./... github.com/alexfalkowski/$(NAME)

# Release to docker hub.
docker:
# Build docker image.
build-docker:
bin/build/docker/build $(NAME)

# Push to docker hub.
push-docker:
bin/build/docker/push $(NAME)

# Start the environment.
Expand Down

0 comments on commit 5dadc44

Please sign in to comment.