Skip to content

Merge pull request #1188 from vmware-samples/dependabot/go_modules/vm… #7

Merge pull request #1188 from vmware-samples/dependabot/go_modules/vm…

Merge pull request #1188 from vmware-samples/dependabot/go_modules/vm… #7

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@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: vmware-event-router/go.sum
id: go
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- 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