forked from vmware-samples/vcenter-event-broker-appliance
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.42 KB
/
upload-dev-image.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
name: VMware Event Router Development Image Build
# triggered on every push to development but only when changes inside
# vmware-event-router (sub)dir(s)
on:
push:
paths:
- "vmware-event-router/**"
branches:
- "development"
# run all jobs with these defaults, unless specified otherwise
defaults:
run:
shell: bash
working-directory: ./vmware-event-router
jobs:
image:
strategy:
matrix:
go-version: ["1.19"]
platform: ["ubuntu-latest"]
runs-on: ${{ matrix.platform }}
timeout-minutes: 20
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: vmware-event-router/go.sum
id: go
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Setup ko
uses: ko-build/setup-ko@3aebd0597dc1e9d1a26bcfdb7cbeb19c131d3037
- name: Get short COMMIT and TAG
run: |
echo "KO_COMMIT=$(echo -n $GITHUB_SHA | cut -c -8)" >> $GITHUB_ENV
echo "KO_TAG=$(basename "${{ github.ref }}")" >> $GITHUB_ENV
- name: Build and push multi-arch image
id: build
run: |
# build and push with development tag
ko resolve --platform=linux/arm64,linux/amd64 --tags ${KO_COMMIT},development -BRf deploy/event-router-k8s.yaml