Skip to content

Commit

Permalink
Add integration with MQTT for GRDF (#20)
Browse files Browse the repository at this point in the history
* Create docker-image.yml

* Update docker-image.yml

* Create docker-image_new.yml

* Delete docker-image.yml

* Add MQTT for GRDF

based/tested only on Alpine docker setup

* Yaml fix and use variable for docker registry tag

* Update action versions

* Update pre-commit configuration (use logToCs action)

* Fix yamllint notices

* Update config mapping

See https://developers.home-assistant.io/blog/2023/11/06/public-addon-config/

* Align first two attribs

attribs start with the type, and end with the 'unit', this was not the case for 'period' attribs

* Add typing hints, correct f-string

* fixing pre-commit errors

* Fixing pre-commit errors

* Fix readme formatting (mdformat)

* Add explicit typing as suggested by author

* Correct extra backslashes added to link

* Update dockerfile generation (default alpine, var for name)

* Use DOCKERFILE var in 2nd (=first) location

* Dummy commit to test flow

only removed empty line

---------

Co-authored-by: MDW <[email protected]>
  • Loading branch information
vingerha and mdeweerd authored Mar 1, 2024
1 parent 5c9b26f commit 30665a2
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 364 deletions.
335 changes: 0 additions & 335 deletions .github/logToCs.py

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
name: Builder

env:
BUILD_ARGS: "--test"
MONITORED_FILES: "build.yaml config.yaml Dockerfile rootfs"

# yamllint disable-line rule:truthy
on:
push:
branches:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/docker-image_new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Docker Image CI
# yamllint disable-line rule:truthy
on:
push:
branches: [meters-to-ha]
pull_request:
branches: [meters-to-ha]
env:
DOCKER_HUB_NAME: ${{ secrets.DOCKER_HUB_NAME || github.repository }}
DOCKERFILE: ./DockerfileAlpine
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file ${{ env.DOCKERFILE }} --tag my-image-name:$(date +%s)
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

# Production versions
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.DOCKER_HUB_NAME }}:latest
Loading

0 comments on commit 30665a2

Please sign in to comment.