-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (37 loc) · 894 Bytes
/
build.yaml
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
43
44
45
46
47
48
49
name: Build Heartbeat
on:
push:
branches:
- main
paths:
- 'Dockerfile'
- '**.go'
jobs:
build:
runs-on: ubuntu-20.04
env:
IMAGE: ghcr.io/bartr/heartbeat
CSE: ghcr.io/cse-labs/heartbeat
steps:
- uses: actions/checkout@v2
- name: Login to Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GH_ID }}
password: ${{ secrets.GH_PAT }}
- name: Docker pull
run: |
docker pull golang:alpine
docker pull busybox
- name: Docker Build
run: |
docker build . -t image
- name: Docker Tag and Push
run: |
# tag the image
docker tag image $IMAGE:beta
docker tag image $CSE:beta
# Push to the registries
docker push -a $IMAGE
docker push -a $CSE