Skip to content

Commit

Permalink
Add CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
apognu committed Feb 27, 2025
1 parent 4329a62 commit 76ba161
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build container image

on:
workflow_call:
inputs:
image:
type: string
description: "Version to build"
required: true

jobs:
build_container_image:
name: Build container image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Docker
uses: docker/setup-buildx-action@v3
- name: Build container image
uses: docker/build-push-action@v5
with:
push: false
tags: ${{ inputs.image }}


10 changes: 10 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Build and test

on: [pull_request]

jobs:
build:
uses: ./.github/workflows/docker.yml
with:
image: europe-west1-docker.pkg.dev/marble-infra/marble/marble-ner:dev

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY pyproject.toml poetry.lock /app/
RUN \
poetry install && \
poetry run python -c 'import os, gliner; gliner.GLiNER.from_pretrained(os.getenv("GLINER_MODEL"))' && \
poetry cache clear --all '' && \
poetry cache clear -n --all '' && \
rm -rf /root/.cache/pypoetry/artifacts

COPY . /app
Expand Down

0 comments on commit 76ba161

Please sign in to comment.