This is an automated email from the ASF dual-hosted git repository.
asorokoumov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/otava.git
The following commit(s) were added to refs/heads/master by this push:
new 36cd1cb Run Docker build in CI (#90)
36cd1cb is described below
commit 36cd1cb9a0a4df3eb87069e30b4fe29dcc541a7f
Author: Alex Sorokoumov <[email protected]>
AuthorDate: Tue Sep 9 16:47:49 2025 -0700
Run Docker build in CI (#90)
* Reduce Docker image size
```
$ uv run tox -e docker-build
```
Without this PR:
```
$ docker image ls | grep apache/otava
apache/otava latest 2b43a1b28f21 5
seconds ago 1.8GB
```
With this PR:
```
$ docker image ls | grep apache/otava
apache/otava latest fe6ae40666a2 13
seconds ago 778MB
```
* Run Docker build in CI
---
.github/workflows/python-app.yml | 25 +++++++++++++++++++++++++
tox.ini | 2 +-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml
index e0db0ac..c3a94a9 100644
--- a/.github/workflows/python-app.yml
+++ b/.github/workflows/python-app.yml
@@ -54,3 +54,28 @@ jobs:
- name: Run tox
run: tox -e py
+
+ docker-build:
+ runs-on: ubuntu-latest
+ needs: build
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v6
+ with:
+ python-version: "3.10"
+
+ - name: Install the project
+ run: uv sync --all-extras --dev
+
+ - name: Install tox
+ run: uv tool install tox --with tox-uv
+
+ - name: Build Docker image
+ run: uv run tox -e docker-build
diff --git a/tox.ini b/tox.ini
index 9413a1f..c8dc0de 100644
--- a/tox.ini
+++ b/tox.ini
@@ -85,7 +85,7 @@ setenv =
DOCKER_PROJECT=apache/otava
UV_OPTS = -v
commands =
- docker buildx build --tag {env:DOCKER_PROJECT}:latest --ssh=default .
+ docker buildx build --tag {env:DOCKER_PROJECT}:latest .
push: docker image tag {env:DOCKER_PROJECT}:latest
{env:DOCKER_PROJECT}:{env:RELEASE_VERSION}
push: docker image tag {env:DOCKER_PROJECT}:{env:RELEASE_VERSION}
{env:DOCKER_REGISTRY}/{env:DOCKER_PROJECT}:{env:RELEASE_VERSION}
push: docker image tag {env:DOCKER_PROJECT}:latest
{env:DOCKER_REGISTRY}/{env:DOCKER_PROJECT}:latest