Skip to content

Commit

Permalink
update to influxdb2 client, update dependencies, new deploy github ac…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
tedpearson committed Dec 5, 2022
1 parent fb9fa89 commit d4c42f1
Show file tree
Hide file tree
Showing 5 changed files with 471 additions and 117 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: release

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
release_version:
Expand Down Expand Up @@ -31,6 +34,8 @@ jobs:

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get dependencies
run: go get -v -t -d ./...
Expand All @@ -41,12 +46,18 @@ jobs:
- name: Build
run: env GOOS=${{matrix.GOOS}} GOARCH=${{matrix.GOARCH}} go build -v -o ${{env.executable}} .

- name: Fetch all tags
run: git fetch --force --tags
- name: Get the tag
id: tag_name
run: echo "TAG_NAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Create or update release
id: create_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ${{env.executable}}
tag: ${{inputs.release_version}}
tag: ${{env.TAG_NAME}}
commit: master
token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 6 additions & 3 deletions ecobeemetrics.example.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
influxdb:
host: http://localhost:8086
user: user
password: password
database: ecobee
# for influx 1.8/VictoriaMetrics, use "user:password"
auth_token: token
# for influx 1.8/VictoriaMetrics, use blank
org: ""
# for influx 1.8/VictoriaMetrics, use "database" or "database/retention-policy"
bucket: forecast
measurements:
thermostat: thermostat
sensor: sensor
Expand Down
41 changes: 22 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,40 @@ module github.com/tedpearson/ecobeemetrics
go 1.17

require (
github.com/go-co-op/gocron v1.11.0
github.com/go-co-op/gocron v1.18.0
github.com/iancoleman/strcase v0.2.0
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab
github.com/influxdata/influxdb-client-go/v2 v2.12.1
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.9.1
github.com/rspier/go-ecobee v0.0.0-20210711212934-f683f187e076
github.com/spf13/viper v1.10.1
github.com/spf13/viper v1.14.0
)

require (
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/golang/glog v0.0.0-20210429001901-424d2337a529 // indirect
github.com/deepmap/oapi-codegen v1.8.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/kr/pretty v0.2.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
golang.org/x/text v0.3.7 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/oauth2 v0.2.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit d4c42f1

Please sign in to comment.