forked from csi-addons/volume-replication-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.34 KB
/
test-and-build.yaml
File metadata and controls
46 lines (39 loc) · 1.34 KB
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: docker-build
on:
pull_request:
branches: [ '*' ]
jobs:
test:
name: test and build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.17"]
steps:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: copy volume-replication-operator repo in go src
run: |
mkdir -p /home/runner/go/src/github.com/csi-addons
cp -r /home/runner/work/volume-replication-operator/volume-replication-operator /home/runner/go/src/github.com/csi-addons
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1.6.0
- name: run tests and build docker image
working-directory: "/home/runner/go/src/github.com/csi-addons/volume-replication-operator"
env:
GOPATH: /home/runner/go
run: |
export PATH=$PATH:$GOPATH/bin
export VERSION="2.3.2"
wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v"$VERSION"/kubebuilder_"$VERSION"_linux_amd64.tar.gz
tar -zxvf kubebuilder_"$VERSION"_linux_amd64.tar.gz
export KUBEBUILDER_ASSETS="$(pwd)/kubebuilder_"$VERSION"_linux_amd64/bin"
make dockerx-build-multi-arch