Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d72ab63e09 | ||
|
|
d4a466ce71
|
+47
-12
@@ -6,26 +6,22 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build_pip_package:
|
build_pip_package:
|
||||||
name: "Build Pip package"
|
name: "Build Pip package"
|
||||||
runs-on: hostinger
|
runs-on: woryzen
|
||||||
timeout-minutes: 30
|
|
||||||
container:
|
|
||||||
image: gitea.woggioni.net/woggioni/gitea-runner/ubuntu:26.04
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.14.6'
|
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
- name: Install dependencies
|
- name: Bugis Core
|
||||||
run: |
|
run: |
|
||||||
|
cd core
|
||||||
python -m venv .venv
|
python -m venv .venv
|
||||||
.venv/bin/pip install -r requirements-dev.txt
|
.venv/bin/pip install -r requirements-dev.txt
|
||||||
- name: Unit tests
|
.venv/bin/python -m build
|
||||||
run: |
|
|
||||||
.venv/bin/pip install .
|
.venv/bin/pip install .
|
||||||
.venv/bin/python -m mypy -p src
|
.venv/bin/python -m mypy -p src
|
||||||
.venv/bin/python -m unittest discover -s tests
|
.venv/bin/python -m unittest discover -s tests
|
||||||
@@ -35,5 +31,44 @@ jobs:
|
|||||||
TWINE_USERNAME: ${{ vars.PUBLISHER_USERNAME }}
|
TWINE_USERNAME: ${{ vars.PUBLISHER_USERNAME }}
|
||||||
TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }}
|
TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
.venv/bin/pyproject-build
|
cd core
|
||||||
.venv/bin/twine upload --repository gitea dist/*.whl dist/*.tar.gz
|
.venv/bin/python -m twine upload --repository gitea dist/*{.whl,tar.gz}
|
||||||
|
build_docker_image:
|
||||||
|
name: "Build Docker image"
|
||||||
|
runs-on: woryzen
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
- name: Get package version
|
||||||
|
run: |
|
||||||
|
echo VERSION=$(python -m setuptools_scm) >> "$GITHUB_ENV"
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3.4.0
|
||||||
|
with:
|
||||||
|
driver: docker-container
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/arm64
|
||||||
|
- name: Login to Gitea container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: gitea.woggioni.net
|
||||||
|
username: woggioni
|
||||||
|
password: ${{ secrets.PUBLISHER_TOKEN }}
|
||||||
|
- name: Build and push bugis images
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/arm64
|
||||||
|
push: true
|
||||||
|
pull: true
|
||||||
|
tags: |
|
||||||
|
"gitea.woggioni.net/woggioni/bugis:latest"
|
||||||
|
"gitea.woggioni.net/woggioni/bugis:${{ env.VERSION }}"
|
||||||
|
cache-from: type=registry,ref=gitea.woggioni.net/woggioni/bugis:buildx
|
||||||
|
cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/bugis:buildx
|
||||||
|
|||||||
Reference in New Issue
Block a user