Skip to content

Commit

Permalink
update github action automation
Browse files Browse the repository at this point in the history
  • Loading branch information
i-cz authored Mar 9, 2024
1 parent 4c9b498 commit e76956c
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ updates:
open-pull-requests-limit: 10
target-branch: master
reviewers:
- marciogranzotto
- i-cz
assignees:
- marciogranzotto
- i-cz
2 changes: 1 addition & 1 deletion .github/workflows/manually_update_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
image: hassioaddons/repository-updater:latest
steps:
- name: upload
run: repository-updater --token ${{ secrets.GIT_TOKEN }} --repository marciogranzotto/addons-repository --addon nightscout
run: repository-updater --token ${{ secrets.GIT_TOKEN }} --repository i-cz/addons-repository --addon nightscout
19 changes: 10 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
build-amd64:
if: {{ vars.AMD64 == 'true' }}
name: Build and publish amd64 image
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -45,12 +46,12 @@ jobs:
- name: publish aarch64 docker files
if: github.event_name != 'pull_request'
run: docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ~/.docker:/root/.docker -v "$(pwd)":/data homeassistant/amd64-builder -t nightscout --aarch64 --release-tag --docker-user ihlcz --docker-password ${{ secrets.DOCKER_PASSWORD }}
update-main-repo:
needs: [build-amd64, build-aarch64]
name: Update addons repository
runs-on: ubuntu-latest
container:
image: hassioaddons/repository-updater:latest
steps:
- name: upload
run: repository-updater --token ${{ secrets.GIT_TOKEN }} --repository i-cz/addons-repository --addon nightscout
#update-main-repo:
# needs: [build-amd64, build-aarch64]
# name: Update addons repository
# runs-on: ubuntu-latest
# container:
# image: hassioaddons/repository-updater:latest
# steps:
# - name: upload
# run: repository-updater --token ${{ secrets.GIT_TOKEN }} --repository i-cz/addons-repository --addon nightscout
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- uses: gaurav-nelson/github-action-markdown-link-check@v1
build-amd64:
name: Build amd64 image
if: {{ vars.AMD64 == 'true' }}
runs-on: ubuntu-latest
needs: [dockerlint, markdown-link-check]
steps:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v15.0.2-custom+1
- Customized build with support for Glooko and LibreLinkUp

## v1.2.0
- Update Nightscout from 14.0.4 to 14.2.2
- Update base images
Expand Down
2 changes: 1 addition & 1 deletion nightscout/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ LABEL \
io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Marcio Granzotto <oscensores@gmail.com>" \
maintainer="Ivo Hlavaty <ihlavaty.cz@gmail.com>" \
org.opencontainers.image.title="Nightscout" \
org.opencontainers.image.description="Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime." \
org.opencontainers.image.vendor="Marcio Granzotto" \
Expand Down
4 changes: 4 additions & 0 deletions nightscout/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
"connect_link_up_password": "",
"connect_link_up_server": "api-eu.libreview.io",
"connect_link_up_region": "EU",
"connect_glooko_email": "",
"connect_glooko_password": "",
"plugins": [
"careportal",
"boluscalc",
Expand Down Expand Up @@ -64,6 +66,8 @@
"connect_link_up_password": "str",
"connect_link_up_server": "str",
"connect_link_up_region": "str",
"connect_glooko_email": "str",
"connect_glooko_password": "str",
"auth_default_roles": "list(admin|denied|status-only|readable|careportal|devicestatus-upload|activity)?",
"theme": "list(default|colors|colorblindfriendly)",
"import_config_url": "str?",
Expand Down
5 changes: 5 additions & 0 deletions nightscout/rootfs/etc/cont-init.d/nightscout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ readonly connect_link_up_username=$(bashio::config 'connect_link_up_username')
readonly connect_link_up_password=$(bashio::config 'connect_link_up_password')
readonly connect_link_up_server=$(bashio::config 'connect_link_up_server')
readonly connect_link_up_region=$(bashio::config 'connect_link_up_region')
readonly connect_glooko_email=$(bashio::config 'connect_glooko_email')
readonly connect_glooko_password=$(bashio::config 'connect_glooko_password')


bashio::log.info "Setting up API KEY: ${api_key}"
export API_SECRET="${api_key}"
Expand All @@ -21,3 +24,5 @@ export CONNECT_LINK_UP_USERNAME="${connect_link_up_username}"
export CONNECT_LINK_UP_PASSWORD="${connect_link_up_password}"
export CONNECT_LINK_UP_SERVER="${connect_link_up_server}"
export CONNECT_LINK_UP_REGION="${connect_link_up_region}"
export CONNECT_GLOOKO_EMAIL="${connect_glooko_email}"
export CONNECT_GLOOKO_PASSWORD="${connect_glooko_password}"
7 changes: 7 additions & 0 deletions nightscout/rootfs/etc/services.d/nightscout/run
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ readonly connect_link_up_server=$(bashio::config 'connect_link_up_server')
bashio::log.debug "Setting up CONNECT_LINK_UP_SERVER: ${connect_link_up_server}"
readonly connect_link_up_region=$(bashio::config 'connect_link_up_region')
bashio::log.debug "Setting up CONNECT_LINK_UP_REGION: ${connect_link_up_region}"
readonly connect_glooko_email=$(bashio::config 'connect_glooko_email')
bashio::log.debug "Setting up CONNECT_GLOOKO_EMAIL: ${connect_glooko_email}"
readonly connect_glooko_password=$(bashio::config 'connect_glooko_password')
bashio::log.debug "Setting up CONNECT_GLOOKO_PASSWORD: ${connect_glooko_password}"


export API_SECRET="${api_key}"
export HOSTNAME="127.0.0.1"
Expand All @@ -39,6 +44,8 @@ export CONNECT_LINK_UP_USERNAME="${connect_link_up_username}"
export CONNECT_LINK_UP_PASSWORD="${connect_link_up_password}"
export CONNECT_LINK_UP_SERVER="${connect_link_up_server}"
export CONNECT_LINK_UP_REGION="${connect_link_up_region}"
export CONNECT_GLOOKO_EMAIL="${connect_glooko_email}"
export CONNECT_GLOOKO_PASSWORD="${connect_glooko_password}"

if bashio::config.has_value 'auth_default_roles'; then
readonly auth_default_roles=$(bashio::config 'auth_default_roles')
Expand Down

0 comments on commit e76956c

Please sign in to comment.