Merge pull request #1100 from dolfolife/development #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@93397bea11091df50f3d7e59dc26a7711a8bcfbe | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache-dependency-path: vmware-event-router/go.sum | |
id: go | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac | |
- name: Setup ko | |
uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa | |
- 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 |