Skip to content

Commit

Permalink
fix(ci): reintroduce var to make ci work
Browse files Browse the repository at this point in the history
  • Loading branch information
hugotiburtino committed Nov 12, 2024
1 parent 528ffcc commit febe42b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion images/dbdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ image_name=athene2-dbdump-cronjob

major_version=3
minor_version=4
patch_version=5
patch_version=6
version=$(major_version).$(minor_version).$(patch_version)

include ../docker.mk
5 changes: 3 additions & 2 deletions images/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@ ifeq ($(minor_version),)
$(error minor_version not defined)
endif

local_name = serlo/$(image_name)
remote_image_name := ghcr.io/serlo/infra/$(image_name)

patch_version ?= $(shell git log --pretty=format:'' | wc -l)

.PHONY: docker_build
docker_build:
docker build --build-arg version=$(version) --build-arg git_revision=$(shell git log | head -n 1 | cut -f 2 -d ' ') -t $(image_name):$(version) .
docker build --build-arg version=$(version) --build-arg git_revision=$(shell git log | head -n 1 | cut -f 2 -d ' ') -t $(local_name):$(version) .

.PHONY: docker_build_push
docker_build_push:
docker pull $(remote_image_name):$(version) 2>/dev/null >/dev/null || $(MAKE) docker_build docker_push

.PHONY: docker_push
docker_push:
docker tag $(image_name):$(version) $(remote_image_name):$(version)
docker tag $(local_name):$(version) $(remote_image_name):$(version)
docker push $(remote_image_name):$(version)

.PHONY: echo-version
Expand Down

0 comments on commit febe42b

Please sign in to comment.