From a6623b8e76ca192d8fdc2d3342f2b96af8b6efb7 Mon Sep 17 00:00:00 2001 From: Noah Stride Date: Fri, 30 Aug 2024 13:49:23 +0100 Subject: [PATCH] Add Ko build for OCI image --- .github/workflows/release.yaml | 11 +++++------ .goreleaser.yaml | 11 +++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 58ee680..91d59dd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,21 +6,20 @@ on: permissions: contents: write + packages: write jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up Go + - name: Set up Go uses: actions/setup-go@v5 - - - name: Run GoReleaser + - uses: ko-build/setup-ko@v0.6 + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: # either 'goreleaser' (default) or 'goreleaser-pro' diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f0ff055..9151120 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -44,3 +44,14 @@ changelog: exclude: - "^docs:" - "^test:" + +kos: + - repository: ghcr.io/strideynet/spiffe-pinger + tags: + - "{{.Version}}" + - latest + bare: true + preserve_import_paths: false + platforms: + - linux/amd64 + - linux/arm64 \ No newline at end of file