This commit is contained in:
parent
1c29a10a0a
commit
49c8c6a305
24
.gitea/workflows/ci.yaml
Normal file
24
.gitea/workflows/ci.yaml
Normal 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
13
Containerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM golang:1.23 as builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ./ ./
|
||||||
|
RUN go mod download
|
||||||
|
RUN go build -o director ./cmd/director
|
||||||
|
|
||||||
|
FROM alpine:3.21
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /app/director .
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
CMD ["./director"]
|
Loading…
x
Reference in New Issue
Block a user