-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (41 loc) · 1.31 KB
/
module.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
name: build
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
# this runs ssh-agent so that the Docker build can access the private repo
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_BUILD_KEY }}
# this forces go get to use SSH and therefore the SSH key
- run: |
git config --global --replace-all url."ssh://[email protected]/".insteadOf https://github.com/
- name: Restore go cache
uses: actions/cache@v1
with:
# the ff is mounted into the container as ~/go/pkg/mod
path: /home/runner/work/_temp/_github_home/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('control/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up kubebuilder
uses: fluxcd/pkg/actions/kubebuilder@main
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
buildkitd-flags: "--debug"
- name: Run tests
env:
GOPRIVATE: github.com/squaremo/fleeet
GOPATH: /home/runner/work/_temp/_github_home/go
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
run: make -C ./module test docker-build