Skip to content

Commit

Permalink
Merge pull request #85 from sanderdw/reader-1.11.1
Browse files Browse the repository at this point in the history
DSMR Reader 1.11.1
  • Loading branch information
sanderdw committed Apr 16, 2024
2 parents 8bc5eee + dfc4d90 commit 21198bd
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 28 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/dsmr-reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches:
- 'master'
- 'reader-1.11.0'
- 'reader-1.11.1'
tags:
- '*.*.*'
paths:
Expand All @@ -23,58 +23,60 @@ jobs:
# AMD64
- DOCKER_TAG_SUFFIX: amd64
S6_ARCH: amd64
BASE_IMAGE: xirixiz/dsmr-reader-docker:5.11.0-2024.02.04
BASE_IMAGE: ghcr.io/xirixiz/dsmr-reader-docker:5.11.0-2024.04.01
PLATFORMS: linux/amd64
QEMU_ARCH: x86_64

# ARM32V6
- DOCKER_TAG_SUFFIX: armhf
S6_ARCH: armhf
BASE_IMAGE: xirixiz/dsmr-reader-docker:5.11.0-2024.02.04
BASE_IMAGE: ghcr.io/xirixiz/dsmr-reader-docker:5.11.0-2024.04.01
PLATFORMS: linux/arm/v6
QEMU_ARCH: arm

# ARM32V7
- DOCKER_TAG_SUFFIX: armv7
S6_ARCH: armv7
BASE_IMAGE: xirixiz/dsmr-reader-docker:5.11.0-2024.02.04
BASE_IMAGE: ghcr.io/xirixiz/dsmr-reader-docker:5.11.0-2024.04.01
PLATFORMS: linux/arm/v7
QEMU_ARCH: arm

# ARM64V8
- DOCKER_TAG_SUFFIX: aarch64
S6_ARCH: aarch64
BASE_IMAGE: xirixiz/dsmr-reader-docker:5.11.0-2024.02.04
BASE_IMAGE: ghcr.io/xirixiz/dsmr-reader-docker:5.11.0-2024.04.01
PLATFORMS: linux/arm64/v8
QEMU_ARCH: aarch64

steps:
# Get the repository's code
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
# https://github.com/docker/setup-qemu-action
- name: Get the version from config.json
id: data
run: |
version=$(jq --raw-output '.version' ./dsmr_reader/config.json)
echo "::set-output name=HA_RELEASE::$version"
echo "HA_RELEASE=$version" >> "$GITHUB_OUTPUT"
- name: DSMR addon release
run: echo ${{ steps.data.outputs.HA_RELEASE }}
env:
HA_RELEASE: ${{ steps.data.outputs.HA_RELEASE }}
run: echo "$HA_RELEASE"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta # you'll use this in the next step
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
Expand All @@ -89,7 +91,7 @@ jobs:
type=semver,pattern={{major}}
type=raw,value=${{ steps.data.outputs.HA_RELEASE }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./dsmr_reader
platforms: ${{ matrix.PLATFORMS }}
Expand Down
7 changes: 7 additions & 0 deletions dsmr_reader/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.11.1

- Support for PostgreSQL 16.2
- Technical: Bashio update to v0.16.2
- Technical: Github Action workflow updated
- Technical: S6 Overlay v3

## 1.11.0

- Update to DSMR-reader v5.11
Expand Down
20 changes: 8 additions & 12 deletions dsmr_reader/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ ENV LANG C.UTF-8

RUN apk add --no-cache jq

# Add bashio
RUN \
curl -J -L -o /tmp/bashio.tar.gz \
"https://github.com/hassio-addons/bashio/archive/v0.14.3.tar.gz" \
&& mkdir /tmp/bashio \
&& tar zxvf \
/tmp/bashio.tar.gz \
--strip 1 -C /tmp/bashio \
\
&& mv /tmp/bashio/lib /usr/lib/bashio \
mkdir -p /usr/src/bashio \
&& curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v0.16.2.tar.gz" \
| tar -xzf - --strip 1 -C /usr/src/bashio \
&& mv /usr/src/bashio/lib /usr/lib/bashio \
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
&& rm -f -r \
/tmp/*
\
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/src/*

# HOMEASSISTANT Add-On OVERRIDES
COPY rootfs /
RUN chmod a+x /etc/cont-init.d/01-set-hassio-vars
RUN chmod a+x /etc/s6-overlay/s6-rc.d/set-hassio-vars/run

ENV DUID=0
ENV DGID=0
Expand Down
2 changes: 1 addition & 1 deletion dsmr_reader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Credits to Dennis Siemensma for creating the DSMR Reader software (https://dsmr-
![DSMR Reader](https://github.com/sanderdw/hassio-addons/raw/master/images/dsmr_reader.png)

[dsmr-shield]: https://img.shields.io/badge/DSMR%20Reader%20Version-%205.11-purple.svg?style=flat-square
[addon-shield]: https://img.shields.io/badge/Addon%20Version-%201.11.0-purple.svg?style=flat-square
[addon-shield]: https://img.shields.io/badge/Addon%20Version-%201.11.1-purple.svg?style=flat-square

[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg?style=flat-square
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg?style=flat-square
Expand Down
3 changes: 2 additions & 1 deletion dsmr_reader/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "DSMR Reader",
"version": "1.11.0",
"version": "1.11.1",
"slug": "dsmr_reader",
"description": "Used for reading the smart meter DSMR P1 port (https://dsmr-reader.readthedocs.io)",
"arch": ["armhf", "armv7", "aarch64", "amd64"],
Expand All @@ -12,6 +12,7 @@
"ingress": true,
"panel_icon": "mdi:leaf-circle-outline",
"hassio_api": true,
"init": false,
"map": ["backup:rw"],
"ports": {
"80/tcp": null
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set-hassio-vars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bashio
#!/command/with-contenv bashio

#---------------------------------------------------------------------------------------------------------------------------
# HOMEASSISTANT Add-On OVERRIDES
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/set-hassio-vars/run
Empty file.

0 comments on commit 21198bd

Please sign in to comment.