HassIO: add version tag to docker image (#1242)
This commit is contained in:
parent
4fbdb526b0
commit
1a03826dcb
3 changed files with 11 additions and 6 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
6
Makefile
6
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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue