diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08331f58c..9dedc41b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/Makefile b/Makefile index a11220f93..650f46db9 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/docker/tmpl.Dockerfile b/docker/tmpl.Dockerfile index 2877c8d2c..cb55485d6 100644 --- a/docker/tmpl.Dockerfile +++ b/docker/tmpl.Dockerfile @@ -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