-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 929 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
on:
push:
schedule:
- cron: '30 3 * * 2'
name: CI
jobs:
docker-build:
name: Build Docker image
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: |
docker build -t spaceapi/influxdb-sensor-logger:latest .
docker-publish:
name: Publish Docker image
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: |
docker build \
--no-cache \
-t spaceapi/influxdb-sensor-logger:latest \
-t spaceapi/influxdb-sensor-logger:v1 \
.
- name: Push Docker image
run: |
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" && \
docker push -a spaceapi/influxdb-sensor-logger