Skip to content

Commit

Permalink
feat(ha): init ha add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
atbore-phx committed Mar 7, 2024
1 parent 10c0be4 commit 16805cd
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
packages: write

jobs:
goreleaser:
Expand All @@ -18,6 +19,12 @@ jobs:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
5 changes: 5 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ builds:
binary: bin/sbam
env:
- CGO_ENABLED=0
dockers:
- image_templates:
- "{{ .ProjectName }}:{{ .Version }}"
- "{{ .ProjectName }}:latest"

changelog:
sort: asc
filters:
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM alpine:latest

COPY bin/sbam /usr/bin/
RUN chmod a+x /usr/bin/sbam
Empty file added ha
Empty file.
8 changes: 8 additions & 0 deletions home-assistant/add-on/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ARG BUILD_FROM
FROM $BUILD_FROM

# Copy data for add-on
COPY run.sh /
RUN chmod a+x /run.sh

CMD [ "/run.sh" ]
9 changes: 9 additions & 0 deletions home-assistant/add-on/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: "sbam"
version: "1.1.0"
slug: folder
description: >-
"Smart Battery Avanced Manager"
arch:
- amd64
url: "https://github.com/atbore-phx/sbam"
image: gcr.io/atbore-phx/sbam:latest
3 changes: 3 additions & 0 deletions home-assistant/add-on/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/with-contenv bashio

sbam -h

0 comments on commit 16805cd

Please sign in to comment.