Skip to content

Commit a2d8e68

Browse files
committed
chore(ci): refactor release pipeline
1 parent 9b73ea1 commit a2d8e68

File tree

5 files changed

+23
-39
lines changed

5 files changed

+23
-39
lines changed

.github/workflows/build-push-model-image.yml renamed to .github/workflows/publish-image-with-model.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,25 @@ jobs:
4646
cache: 'pip'
4747

4848
- name: Install Poetry
49+
uses: abatilo/actions-poetry@v4
50+
with:
51+
poetry-version: latest
52+
53+
- name: Setup virtualenv
4954
run: |
50-
curl -sSL https://install.python-poetry.org | python3 -
51-
echo "$HOME/.local/bin" >> $GITHUB_PATH
55+
poetry config virtualenvs.create true --local
56+
poetry config virtualenvs.in-project true --local
57+
58+
- name: Cache Poetry dependencies
59+
uses: actions/cache@v3
60+
with:
61+
path: .venv
62+
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
63+
restore-keys: |
64+
${{ runner.os }}-poetry-${{ inputs.python-version }}-
5265
5366
- name: Install dependencies
54-
run: |
55-
poetry config virtualenvs.create false
56-
poetry install --no-dev
67+
run: poetry install
5768

5869
- name: Download model
5970
run: |

.github/workflows/publish.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
name: Publish Docker image
1+
name: Release
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'v*.*.*'
57
workflow_call:
68
inputs:
79
image_tag:

poetry.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ opentelemetry-instrumentation-fastapi = "^0.51b0"
3333
opentelemetry-exporter-otlp = "^1.30.0"
3434
opentelemetry-instrumentation-logging = "^0.51b0"
3535
gunicorn = "^23.0.0"
36+
tomli = "^2.2.1"
3637

3738
[tool.poetry.group.dev.dependencies]
3839
pytest = "^8.2.0"

0 commit comments

Comments
 (0)