Skip to content

Commit

Permalink
CI rework
Browse files Browse the repository at this point in the history
Signed-off-by: Till Wegmueller <[email protected]>
  • Loading branch information
Toasterson committed Jan 30, 2024
1 parent a02012e commit b14431a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
uses: metalbear-co/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Prisma generate
run: cargo prisma generate
- name: Build
run: cargo build --verbose
- name: Run tests
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
package: ["identd", "domainservd", "publisherd"]
package: ["blogd", "domainservd"]
steps:
-
name: Checkout
Expand All @@ -28,9 +28,10 @@ jobs:
password: ${{ github.token }}
-
name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
file: "${{ matrix.package }}.Dockerfile"
push: true
tags: ghcr.io/openflowlabs/oxifed/${{ matrix.package }}:${{ github.ref_name }}
build-args: "PACKAGE=${{ matrix.package }}"
File renamed without changes.
19 changes: 19 additions & 0 deletions domainservd.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM cgr.dev/chainguard/rust:latest-dev as build
ARG PACKAGE
USER root
RUN apk update && apk add --no-cache --update-cache pkgconf openssl openssl-dev
WORKDIR /app
ADD . .
RUN chown -R nonroot /app
USER nonroot
RUN cargo build --release --bin domainservd

FROM cgr.dev/chainguard/wolfi-base
ARG PACKAGE
USER root
#RUN adduser -D nonroot
RUN apk update && apk add --no-cache --update-cache openssl libgcc
USER nonroot
COPY --from=build --chown=nonroot:nonroot /app/target/release/${PACKAGE} /usr/local/bin/${PACKAGE}
ENV PACKAGE=${PACKAGE}
ENTRYPOINT "/usr/local/bin/${PACKAGE}"
3 changes: 1 addition & 2 deletions src/prisma.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Code generated by Prisma Client Rust. DO NOT EDIT

pub static DATAMODEL_STR: &'static str =
include_str!("/export/home/toast/workspace/oxifed/prisma/schema.prisma");
pub static DATAMODEL_STR: &'static str = include_str!("../prisma/schema.prisma");
static DATABASE_STR: &'static str = "postgresql";
pub async fn new_client() -> Result<PrismaClient, ::prisma_client_rust::NewClientError> {
PrismaClient::_builder().build().await
Expand Down

0 comments on commit b14431a

Please sign in to comment.