From e76956c72c8e64fa9d71e27a7bba2f4806012a5d Mon Sep 17 00:00:00 2001 From: i-cz Date: Sat, 9 Mar 2024 09:34:34 +0100 Subject: [PATCH] update github action automation --- .github/dependabot.yml | 4 ++-- .github/workflows/manually_update_repo.yml | 2 +- .github/workflows/publish.yml | 19 ++++++++++--------- .github/workflows/test.yml | 1 + CHANGELOG.md | 3 +++ nightscout/Dockerfile | 2 +- nightscout/config.json | 4 ++++ .../rootfs/etc/cont-init.d/nightscout.sh | 5 +++++ .../rootfs/etc/services.d/nightscout/run | 7 +++++++ 9 files changed, 34 insertions(+), 13 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b081af5..91056d1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,6 +8,6 @@ updates: open-pull-requests-limit: 10 target-branch: master reviewers: - - marciogranzotto + - i-cz assignees: - - marciogranzotto + - i-cz diff --git a/.github/workflows/manually_update_repo.yml b/.github/workflows/manually_update_repo.yml index 83bad7e..a703ff6 100644 --- a/.github/workflows/manually_update_repo.yml +++ b/.github/workflows/manually_update_repo.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2720373..6d2ed24 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,7 @@ on: jobs: build-amd64: + if: {{ vars.AMD64 == 'true' }} name: Build and publish amd64 image runs-on: ubuntu-latest steps: @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bced132..2d4b61a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1459c46..ac067ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/nightscout/Dockerfile b/nightscout/Dockerfile index c75d6df..14278ee 100644 --- a/nightscout/Dockerfile +++ b/nightscout/Dockerfile @@ -63,7 +63,7 @@ LABEL \ io.hass.arch="${BUILD_ARCH}" \ io.hass.type="addon" \ io.hass.version=${BUILD_VERSION} \ - maintainer="Marcio Granzotto " \ + maintainer="Ivo Hlavaty " \ 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" \ diff --git a/nightscout/config.json b/nightscout/config.json index 21dac4d..4c05d5c 100644 --- a/nightscout/config.json +++ b/nightscout/config.json @@ -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", @@ -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?", diff --git a/nightscout/rootfs/etc/cont-init.d/nightscout.sh b/nightscout/rootfs/etc/cont-init.d/nightscout.sh index 3ae782c..4a9a135 100755 --- a/nightscout/rootfs/etc/cont-init.d/nightscout.sh +++ b/nightscout/rootfs/etc/cont-init.d/nightscout.sh @@ -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}" @@ -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}" diff --git a/nightscout/rootfs/etc/services.d/nightscout/run b/nightscout/rootfs/etc/services.d/nightscout/run index b2800c8..8af0240 100755 --- a/nightscout/rootfs/etc/services.d/nightscout/run +++ b/nightscout/rootfs/etc/services.d/nightscout/run @@ -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" @@ -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')