ci: add automatic container build #3

Closed
Job79 wants to merge 16 commits from Job79/pastabble:main into main
2 changed files with 27 additions and 3 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.repository_owner }}/${{ github.event.repository.name }}
tags: latest
containerfiles: |
./Containerfile
- name: Push
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ github.repository_owner }}/${{ github.event.repository.name }}
tags: latest
registry: git.plabble.org
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}

View File

@@ -1,11 +1,11 @@
FROM node:21-alpine3.19 AS frontend-builder FROM node:22-alpine3.20 AS frontend-builder
WORKDIR /build WORKDIR /build
RUN corepack enable RUN corepack enable
COPY pastabble-frontend/ . COPY pastabble-frontend/ .
RUN pnpm i && pnpm build RUN pnpm i && pnpm build
FROM rust:alpine3.19 AS builder FROM rust:alpine3.20 AS builder
WORKDIR /build WORKDIR /build
RUN apk add --no-cache musl-dev RUN apk add --no-cache musl-dev
@@ -18,7 +18,7 @@ RUN case "$(apk --print-arch)" in \
mv ./target/aarch64-unknown-linux-musl /release ;; \ mv ./target/aarch64-unknown-linux-musl /release ;; \
esac esac
FROM alpine:3.19 FROM alpine:3.20
WORKDIR /app WORKDIR /app
RUN mkdir wwwroot data && \ RUN mkdir wwwroot data && \