-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 887 Bytes
/
main.yml
File metadata and controls
41 lines (37 loc) · 887 Bytes
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
name: Anubis Main CD/CI
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
cache-dependency-path: go.sum
- name: Version
run: go version
- name: Build
run: make
- name: Test
run: make test
deploy:
needs: [test]
runs-on: ubuntu-latest
environment: anubis
steps:
- uses: actions/checkout@v2
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log into DigitalOcean container registry
run: doctl registry login
- name: Build container image
run: make build
- name: Build container image
run: make push