Skip to content

Commit

Permalink
add Modfile
Browse files Browse the repository at this point in the history
  • Loading branch information
franzmueller committed Sep 26, 2023
1 parent cc0546e commit 763173d
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Tagged Docker Image'

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
multi:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: module/${{ github.ref_name }}
tag_prefix: ""
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
smartenergyplatform/mgw-kasa-dc:latest
smartenergyplatform/mgw-kasa-dc:${{ github.ref_name }}
ghcr.io/senergy-platform/mgw-kasa-dc:latest
ghcr.io/senergy-platform/mgw-kasa-dc:${{ github.ref_name }}
73 changes: 73 additions & 0 deletions module/Modfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
modfileVersion: "v1"
id: github.com/SENERGY-Platform/mgw-kasa-dc/module
name: Kasa Device-Connector
version: v0.0.1
type: device-connector
deploymentType: single
license: "Apache License 2.0"
dependencies:
github.com/SENERGY-Platform/mgw-mqtt-broker:
version: <v2.0.0
requiredServices:
broker:
- refVar: CONF_MSGBROKER_HOST
services:
- mgw-kasa-dc
services:
mgw-kasa-dc:
name: mgw-kasa-dc
image: ghcr.io/senergy-platform/mgw-kasa-dc:v0.0.1
configs:
discoveryIps:
dataType: string
isList: true
targets:
- refVar: CONF_DISCOVERY_IP_LIST
services:
- mgw-kasa-dc
userInput:
type: text
name: Discovery IPs
description: "List of IPs, e.g. 192.168.0.1, 192.168.0.2"
subnet:
dataType: string
targets:
- refVar: CONF_DISCOVERY_SUBNET
services:
- mgw-kasa-dc
userInput:
type: text
name: Scan Subnet
description: "IP Subnet, e.g. 192.168.1.0/24"
numWorkers:
dataType: int
value: 10
targets:
- refVar: CONF_DISCOVERY_NUM_WORKERS
services:
- mgw-kasa-dc
logLevel:
dataType: string
value: "info"
options:
- "info"
- "debug"
targets:
- refVar: CONF_LOGGER_LEVEL
services:
- mgw-kasa-dc
userInput:
type: text
name: Log Level
energySeconds:
dataType: int
value: 30
targets:
- refVar: CONF_SENERGY_EVENTS_ENERGY_SECONDS
services:
- mgw-kasa-dc
userInput:
type: number
name: Energy Data Poll Rate
description: "refresh energy data every x seconds"

0 comments on commit 763173d

Please sign in to comment.