Skip to content

Commit f169ca2

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/ci/cd' into vedana/config-plane
2 parents b7d91e1 + 8e013b6 commit f169ca2

File tree

82 files changed

+764
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+764
-73
lines changed

.github/workflow-templates/project.template.yml renamed to .github/workflow-templates/app.template.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
name: Test project {{ package.name }}
1+
name: Test app {{ package.name }}
22

33
on:
44
pull_request:
55
paths:
66
- "{{ package.path }}/**"
77
- "libs/jims*/**"
88
- "libs/vedana*/**"
9-
# - "pyproject.toml"
10-
# - "uv.lock"
119
push:
1210
branches: [master]
1311
paths:

.github/workflow-templates/lib.template.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
pull_request:
55
paths:
66
- "{{ package.path }}/**"
7-
# - "pyproject.toml"
8-
# - "uv.lock"
97
push:
108
branches: [master]
119
paths:
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Publish {{ package.name }}
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
{%- if package.name.startswith('jims-') %}
8+
- 'jims-*'
9+
{%- elif package.name.startswith('vedana-') %}
10+
- 'vedana-*'
11+
{%- else %}
12+
- 'v*'
13+
{%- endif %}
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v6
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v7
25+
26+
- name: Build wheel
27+
run: uv build
28+
working-directory: {{ package.path }}
29+
30+
- name: Store the distribution packages
31+
uses: actions/upload-artifact@v6
32+
with:
33+
name: python-package-distributions
34+
path: dist/
35+
36+
publish-to-test-pypi:
37+
environment:
38+
name: testpypi
39+
url: https://test.pypi.org/project/{{ package.name }}/
40+
permissions:
41+
id-token: write
42+
runs-on: ubuntu-latest
43+
needs: build
44+
45+
steps:
46+
- uses: actions/download-artifact@v7
47+
with:
48+
name: python-package-distributions
49+
path: dist/
50+
51+
- name: Publish distribution to TestPyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1
53+
with:
54+
repository-url: https://test.pypi.org/legacy/
55+
56+
publish-to-pypi:
57+
environment:
58+
name: pypi
59+
url: https://pypi.org/project/{{ package.name }}/
60+
permissions:
61+
id-token: write
62+
runs-on: ubuntu-latest
63+
needs:
64+
- build
65+
- publish-to-test-pypi
66+
67+
steps:
68+
- uses: actions/download-artifact@v7
69+
with:
70+
name: python-package-distributions
71+
path: dist/
72+
73+
- name: Publish distribution to PyPI
74+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflow-templates/tool.template.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
pull_request:
55
paths:
66
- "{{ package.path }}/**"
7-
# - "pyproject.toml"
8-
# - "uv.lock"
97
push:
108
branches: [master]
119
paths:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build and push vedana Docker image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'vedana-*'
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: ${{ github.repository }}/vedana
12+
13+
jobs:
14+
build-and-push:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Extract version from tag
25+
id: version
26+
run: |
27+
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
28+
VERSION=${GITHUB_REF#refs/tags/}
29+
VERSION=${VERSION#vedana-}
30+
VERSION=${VERSION#v}
31+
else
32+
VERSION="0.0.0-dev"
33+
fi
34+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
35+
36+
- name: Log in to the Container registry
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ${{ env.REGISTRY }}
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Extract metadata (tags, labels) for Docker
44+
id: meta
45+
uses: docker/metadata-action@v5
46+
with:
47+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
48+
tags: |
49+
type=ref,event=branch
50+
type=match,pattern=vedana-(.*),group=1
51+
type=sha,prefix=
52+
type=raw,value=latest,enable={{is_default_branch}}
53+
54+
- name: Set up Docker Buildx
55+
uses: docker/setup-buildx-action@v3
56+
57+
- name: Build and push Docker image
58+
uses: docker/build-push-action@v6
59+
with:
60+
context: .
61+
file: apps/vedana/Dockerfile
62+
push: true
63+
tags: ${{ steps.meta.outputs.tags }}
64+
labels: ${{ steps.meta.outputs.labels }}
65+
cache-from: type=gha
66+
cache-to: type=gha,mode=max
67+
build-args: |
68+
VERSION=${{ steps.version.outputs.VERSION }}
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22
# For more information, see: https://github.com/epoch8/uv-workspace-codegen/blob/master/README.md
33
# Do not edit this file manually - changes will be overwritten
44

5-
name: Test project vedana
5+
name: Test app vedana
66

77
on:
88
pull_request:
99
paths:
10-
- "projects/vedana/**"
10+
- "apps/vedana/**"
1111
- "libs/jims*/**"
1212
- "libs/vedana*/**"
13-
# - "pyproject.toml"
14-
# - "uv.lock"
1513
push:
1614
branches: [master]
1715
paths:
18-
- "projects/vedana/**"
16+
- "apps/vedana/**"
1917
- "pyproject.toml"
2018
- "uv.lock"
2119

@@ -51,17 +49,17 @@ jobs:
5149
- name: Install
5250
shell: bash
5351
run: |
54-
cd projects/vedana
52+
cd apps/vedana
5553
uv sync --all-groups
5654
5755
- name: Check formatting
5856
shell: bash
5957
run: |
60-
uv run ruff check projects/vedana
58+
uv run ruff check apps/vedana
6159
6260
- name: Check Alembic migrations
6361
shell: bash
6462
run: |
65-
cd projects/vedana
63+
cd apps/vedana
6664
env $(cat .env.ci-cd | grep -v '^#') uv run alembic upgrade heads
67-
env $(cat .env.ci-cd | grep -v '^#') uv run alembic check
65+
env $(cat .env.ci-cd | grep -v '^#') uv run alembic check

.github/workflows/lib-jims-backoffice.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
pull_request:
99
paths:
1010
- "libs/jims-backoffice/**"
11-
# - "pyproject.toml"
12-
# - "uv.lock"
1311
push:
1412
branches: [master]
1513
paths:
@@ -47,4 +45,4 @@ jobs:
4745
- name: Check typing
4846
shell: bash
4947
run: |
50-
uv run mypy -p jims_backoffice
48+
uv run mypy -p jims_backoffice

.github/workflows/lib-jims-core.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
pull_request:
99
paths:
1010
- "libs/jims-core/**"
11-
# - "pyproject.toml"
12-
# - "uv.lock"
1311
push:
1412
branches: [master]
1513
paths:
@@ -54,4 +52,4 @@ jobs:
5452
- name: Check typing
5553
shell: bash
5654
run: |
57-
uv run mypy -p jims_core
55+
uv run mypy -p jims_core

.github/workflows/lib-jims-telegram.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
pull_request:
99
paths:
1010
- "libs/jims-telegram/**"
11-
# - "pyproject.toml"
12-
# - "uv.lock"
1311
push:
1412
branches: [master]
1513
paths:
@@ -47,4 +45,4 @@ jobs:
4745
- name: Check typing
4846
shell: bash
4947
run: |
50-
uv run mypy -p jims_telegram
48+
uv run mypy -p jims_telegram

.github/workflows/lib-jims-tui.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
pull_request:
99
paths:
1010
- "libs/jims-tui/**"
11-
# - "pyproject.toml"
12-
# - "uv.lock"
1311
push:
1412
branches: [master]
1513
paths:
@@ -47,4 +45,4 @@ jobs:
4745
- name: Check typing
4846
shell: bash
4947
run: |
50-
uv run mypy -p jims_tui
48+
uv run mypy -p jims_tui

0 commit comments

Comments
 (0)