aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-03-19 08:51:09 -0400
committerXe Iaso <me@xeiaso.net>2025-03-19 09:10:29 -0400
commit1efcb882619a90ed0f9355cd8485f7aa80ebb324 (patch)
tree16ced941f86d0923623e0ae5fb53e4977f1ecb2c /.github
parent1a13292c2deed38dac8a307ed2cae43bba355b5b (diff)
downloadanubis-1efcb882619a90ed0f9355cd8485f7aa80ebb324.tar.xz
anubis-1efcb882619a90ed0f9355cd8485f7aa80ebb324.zip
Try using ko to build images
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/docker.yml24
1 files changed, 14 insertions, 10 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 958f9eb..5aa85db 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -8,6 +8,9 @@ on:
pull_request:
branches: [ "main" ]
+env:
+ DOCKER_METADATA_SET_OUTPUT_ENV: "true"
+
permissions:
contents: read
packages: write
@@ -20,6 +23,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-tags: true
+ fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
@@ -27,6 +33,12 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
+ - uses: actions/setup-go@v5
+ with:
+ go-version: '1.24.x'
+
+ - uses: ko-build/setup-ko@v0.8
+
- name: Log into registry
uses: docker/login-action@v3
with:
@@ -42,16 +54,8 @@ jobs:
- name: Build and push
id: build
- uses: docker/build-push-action@v6
- with:
- context: .
- cache-to: type=gha
- cache-from: type=gha
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- platforms: linux/arm64/v8,linux/amd64
- sbom: true
- push: true
+ run: |
+ go run ./cmd/containerbuild --docker-repo ghcr.io/techarohq/anubis --slog-level debug
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2