-
Notifications
You must be signed in to change notification settings - Fork 40
66 lines (51 loc) · 1.64 KB
/
image-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
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
on:
workflow_call: {}
schedule:
# Weekdays at noon GMT
- cron: '00 12 * * 1-5'
jobs:
image:
name: Image build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- uses: ko-build/[email protected]
- run: |
ko build --platform=linux/amd64,linux/arm64 --push=${{ github.ref == 'refs/heads/main' }} ./cmd/server \
--image-label=org.opencontainers.image.source=https://github.com/stacklok/mediator,org.opencontainers.image.title="Stacklok Mediator",org.opencontainers.image.licenses=Apache-2.0,org.opencontainers.image.vendor=Stacklok
check-helm:
name: Build Helm chart
# TODO: remove the 'image' build once helm build is stable, because ko resolve will build the image
runs-on: ubuntu-latest
permissions:
contents: read
packages: none
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ko-build/[email protected]
- uses: azure/setup-helm@v3
with:
version: v3.12.2
- run: |
make helm
env:
KO_DOCKER_REPO: "ko.local"
KO_PUSH_IMAGE: "false"
docker-image:
name: Check docker image build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Test build on x86
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: false # Only attempt to build, to verify the Dockerfile is working