HassIO: add version tag to docker image (#1242)

This commit is contained in:
andig 2021-07-25 19:11:03 +02:00
parent 4fbdb526b0
commit 1a03826dcb
3 changed files with 11 additions and 6 deletions

View file

@ -96,7 +96,9 @@ jobs:
fetch-depth: 0
- name: Install
run: curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sudo bash -s -- -b $GOPATH/bin v0.5.1
env:
SEIHON_VERSION: v0.8.3
run: curl -sfL https://raw.githubusercontent.com/ldez/seihon/master/godownloader.sh | sudo bash -s -- -b $GOPATH/bin ${SEIHON_VERSION}
- name: Login
uses: docker/login-action@v1
@ -180,8 +182,8 @@ jobs:
- name: Clean git
run: |
git checkout go.*
rm -rf flags buildflags
git checkout go.*
rm -rf flags buildflags
- name: Create Github Release
uses: goreleaser/goreleaser-action@v2

View file

@ -67,17 +67,17 @@ docker:
publish-testing:
@echo Version: $(VERSION) $(BUILD_DATE)
seihon publish --dry-run=false --template docker/tmpl.Dockerfile --base-runtime-image alpine:$(ALPINE_VERSION) \
EVCC_VERSION=testing seihon publish --dry-run=false --template docker/tmpl.Dockerfile --base-runtime-image alpine:$(ALPINE_VERSION) \
--image-name $(DOCKER_IMAGE) -v "testing" --targets=$(TARGETS)
publish-latest:
@echo Version: $(VERSION) $(BUILD_DATE)
seihon publish --dry-run=false --template docker/tmpl.Dockerfile --base-runtime-image alpine:$(ALPINE_VERSION) \
EVCC_VERSION=latest seihon publish --dry-run=false --template docker/tmpl.Dockerfile --base-runtime-image alpine:$(ALPINE_VERSION) \
--image-name $(DOCKER_IMAGE) -v "latest" --targets=$(TARGETS)
publish-images:
@echo Version: $(VERSION) $(BUILD_DATE)
seihon publish --dry-run=false --template docker/tmpl.Dockerfile --base-runtime-image alpine:$(ALPINE_VERSION) \
EVCC_VERSION=$(VERSION) seihon publish --dry-run=false --template docker/tmpl.Dockerfile --base-runtime-image alpine:$(ALPINE_VERSION) \
--image-name $(DOCKER_IMAGE) -v "latest" -v "$(TAG_NAME)" --targets=$(TARGETS)
prepare-image:

View file

@ -50,6 +50,9 @@ RUN GOARCH={{ .GoARCH }} GOARM={{ .GoARM }} make build
# STEP 3 build a small image including module support
FROM {{ .RuntimeImage }}
ARG BUILD_VERSION={{ env "EVCC_VERSION" }}
LABEL io.hass.version=${BUILD_VERSION}
WORKDIR /app
ENV TZ=Europe/Berlin