forked from 4paradigm/k8s-vgpu-scheduler
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.27 KB
/
build.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
43
44
45
46
47
48
49
50
51
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- run: go get -u golang.org/x/lint/golint
- run: go mod vendor
- run: golint -set_exit_status .
- run: go vet .
- run: go build
docker:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v2
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: docker build and push
run: |
make REGISTRY="localhost:5000" VERSION="${GITHUB_SHA}" all
make REGISTRY="localhost:5000" VERSION="${GITHUB_SHA}" push
make REGISTRY="localhost:5000" VERSION="${GITHUB_SHA}" push-short
make REGISTRY="localhost:5000" VERSION="${GITHUB_SHA}" push-latest