forked from nightscout/cgm-remote-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.17 KB
/
main.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
37
38
39
40
41
42
name: Publish bo-dev Docker image
on:
push:
branches:
- bo-dev
pull_request:
branches:
- bo-dev
jobs:
publish:
name: Publish to Docker Hub
runs-on: ubuntu-latest
if: (github.ref == 'refs/heads/bo-dev') && github.repository_owner == 'bjornoleh'
env:
DOCKER_IMAGE: bjornoleh/nightscout
PLATFORMS: linux/amd64
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Clean git Checkout
if: success()
uses: actions/checkout@v3
- name: Build, tag and push the bo-dev Docker image
if: success() && github.ref == 'refs/heads/bo-dev'
uses: docker/build-push-action@v2
with:
context: .
push: true
no-cache: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.DOCKER_IMAGE }}:bo-dev_${{ github.sha }}
${{ env.DOCKER_IMAGE }}:latest-dev