-
Notifications
You must be signed in to change notification settings - Fork 58
74 lines (64 loc) · 1.78 KB
/
docker-build.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
name: image-builder
on:
push:
branches: ['main', 'release-*']
pull_request:
branches: ['*']
jobs:
docker-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.20", "1.21"]
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build operator docker image
run: make docker-build
bundle-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.20", "1.21"]
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build operator bundle docker image
run: |
make bundle-build
msg='Uncommitted bundle changes. run `make bundle` and commit results.'
# We are using `--ignore-matching-lines` flag with the pattern `createdAt`
# to exclude lines with the timestamp from being considered, as the CSV file
# consistently receives a new timestamp during generation with operator-sdk 1.26 onwards.
git diff --exit-code --ignore-matching-lines createdAt || (echo -e '\e[31m'"$msg"; exit 1)
catalog-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.20", "1.21"]
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build catalog docker image
env:
IMAGE_REGISTRY: localhost:5000
OPM_RENDER_OPTS: --use-http
run: |
docker run -d -p 5000:5000 --name registry registry:2
make bundle-build bundle-push catalog-build