feat: initial ci setup
Some checks failed
Build container / build (push) Failing after 30s

This commit is contained in:
Wesley van Tilburg 2025-01-02 17:18:29 +01:00
parent 1c29a10a0a
commit 171955a6cc
2 changed files with 37 additions and 0 deletions

24
.gitea/workflows/ci.yaml Normal file
View File

@ -0,0 +1,24 @@
name: Build container
on:
push:
jobs:
build:
runs-on: container-builder
steps:
- uses: actions/checkout@v4
- name: Build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ github.actor }}/${{ github.event.repository.name }}
tags: latest
containerfiles: |
./Containerfile
- name: Push
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ github.actor }}/${{ github.event.repository.name }}
tags: ${{ github.ref_name }}
registry: git.plabble.org
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}

13
Containerfile Normal file
View File

@ -0,0 +1,13 @@
FROM docker.io/golang:1.23 as builder
WORKDIR /app
COPY ./ ./
RUN go mod download
RUN go build -o director ./cmd/director
FROM docker.io/alpine:3.21
WORKDIR /app
COPY --from=builder /app/director .
EXPOSE 8080
CMD ["./director"]