forked from openshift/lvm-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.08 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
---
name: image-builder
on:
push:
branches: ['*']
pull_request:
branches: ['*']
jobs:
docker-build:
name: docker-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.18"]
steps:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v2
# 'test' is a sub-target of 'docker-build' and so cache go build & mod
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Go Build Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Build operator docker image
run: make docker-build-combined