Skip to content

Move build process to ko #2

Move build process to ko

Move build process to ko #2

Workflow file for this run

name: ko-test
on:
pull_request:
branches:
- main
jobs:
ko-test:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: docker meta
id: meta
uses: docker/[email protected]
with:
images: fsouza/fake-gcs-server
sep-tags: ","
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- uses: actions/[email protected]
id: setup-go
with:
go-version: "1.21"
- uses: ko-build/[email protected]
- name: ko build
run: |
ko build --platform=all --bare --tags="$(echo "${RAW_TAGS}" | sed -e 's;fsouza/fake-gcs-server:;;g')"
env:
KO_DEFAULTBASEIMAGE: fsouza/alpine-base
KO_DOCKER_REPO: ko.local/fsouza/fake-gcs-server
RAW_TAGS: ${{ steps.meta.outputs.tags }}