chore: docker image release with new tagging scheme

This commit is contained in:
wpetit 2024-02-27 17:37:47 +01:00
parent 805c873695
commit 4d2ca6bd3a
2 changed files with 22 additions and 8 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/node_modules
/.env
/tools
.mktools/

View File

@ -1,4 +1,4 @@
DOCKER_DATE_TAG := $(shell date --utc +%Y.%-m.%-d%-H%-M)
DOCKER_REPOSITORY ?= docker.io/bornholm
YQ_VERSION ?= v4.30.4
YQ_BINARY ?= yq_linux_amd64
@ -31,12 +31,15 @@ docker-run:
--tmpfs /app/data \
fake-smtp:latest
docker-release:
docker tag fake-smtp:latest bornholm/fake-smtp:latest
docker tag fake-smtp:latest bornholm/fake-smtp:$(DOCKER_DATE_TAG)
docker login
docker push bornholm/fake-smtp:latest
docker push bornholm/fake-smtp:$(DOCKER_DATE_TAG)
docker-release: .mktools
docker tag fake-smtp:latest $(DOCKER_REPOSITORY)/fake-smtp:$(MKT_PROJECT_VERSION)
docker tag fake-smtp:latest $(DOCKER_REPOSITORY)/fake-smtp:$(MKT_PROJECT_SHORT_VERSION)
docker tag fake-smtp:latest $(DOCKER_REPOSITORY)/fake-smtp:$(MKT_PROJECT_VERSION_CHANNEL)-latest
docker tag fake-smtp:latest $(DOCKER_REPOSITORY)/fake-smtp:$(MKT_PROJECT_SHORT_VERSION_CHANNEL)-latest
docker push $(DOCKER_REPOSITORY)/fake-smtp:$(MKT_PROJECT_VERSION)
docker push $(DOCKER_REPOSITORY)/fake-smtp:$(MKT_PROJECT_SHORT_VERSION)
docker push $(DOCKER_REPOSITORY)/fake-smtp:$(MKT_PROJECT_VERSION_CHANNEL)-latest
docker push $(DOCKER_REPOSITORY)/fake-smtp:$(MKT_PROJECT_SHORT_VERSION_CHANNEL)-latest
test:
go test -v -race ./...
@ -65,4 +68,14 @@ clean:
rm -rf vendor
rm -rf bin
.PHONY: mktools
mktools:
rm -rf .mktools
curl -q https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/install.sh | $(SHELL)
.mktools:
$(MAKE) mktools
-include .mktools/*.mk
.PHONY: lint watch build vendor tidy release