-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (41 loc) · 972 Bytes
/
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
---
name: "Build"
on:
push:
pull_request:
branches:
- master
jobs:
build_image:
name: Build k8s-toolbox desk
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build image
run: |
./_desk/build-image.sh
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Push images to container registry
run: |
./_desk/push-image.sh
utest:
name: Run unit tests
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v3
with:
go-version: '^1.20.3'
- run: go version
- name: Checkout code
uses: actions/checkout@v2
- name: Run unit tests
run: |
go test ./...
- name: Build and install k8s-toolbox
run: |
go install .