Skip to content

Commit f9a3a04

Browse files
committed
Build Docker image in CI
1 parent 96ab813 commit f9a3a04

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
push:
3+
schedule:
4+
- cron: '30 3 * * 2'
5+
6+
name: CI
7+
8+
jobs:
9+
10+
docker-build:
11+
name: Build Docker image
12+
runs-on: ubuntu-latest
13+
if: github.ref != 'refs/heads/master'
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Build Docker image
17+
run: |
18+
docker build -t spaceapi/influxdb-sensor-logger:latest .
19+
20+
docker-publish:
21+
name: Publish Docker image
22+
runs-on: ubuntu-latest
23+
if: github.ref == 'refs/heads/master'
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Build Docker image
27+
run: |
28+
docker build \
29+
--no-cache \
30+
-t spaceapi/influxdb-sensor-logger:latest \
31+
.
32+
- name: Push Docker image
33+
run: |
34+
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" && \
35+
docker push -a spaceapi/influxdb-sensor-logger

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SpaceAPI Sensor Logger
1+
# SpaceAPI InfluxDB Sensor Logger
22

33
A Python 3 script to relay sensor values from a SpaceAPI endpoint to an
44
InfluxDB instance so it can be viewed in Grafana.

0 commit comments

Comments
 (0)