Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/containerize.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Container

on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
workflow_dispatch:
inputs:
sha:
description: 'Commit SHA to publish'
required: true

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.prepare-checkout.outputs.ref }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{raw}}
type=ref,event=branch
type=sha,format=long
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:1.24.5-bullseye AS build

WORKDIR /go/src/sei-load

COPY go.mod go.sum ./
RUN go mod download

COPY . .
RUN go build -o /go/bin/seiload ./

FROM gcr.io/distroless/base
COPY --from=build /go/bin/seiload /usr/bin/

ENTRYPOINT ["/usr/bin/seiload"]
Loading