added dynamic version support and solved loop call issue
This commit is contained in:
@@ -3,11 +3,14 @@ on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
jobs:
|
||||
"Build pip package":
|
||||
build_pip_package:
|
||||
name: "Build Pip package"
|
||||
runs-on: woryzen
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
cache: 'pip'
|
||||
@@ -25,26 +28,31 @@ jobs:
|
||||
TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }}
|
||||
run: |
|
||||
.venv/bin/python -m twine upload --repository gitea dist/*{.whl,tar.gz}
|
||||
"Build Docker image":
|
||||
build_docker_image:
|
||||
name: "Build Docker image"
|
||||
runs-on: woryzen
|
||||
steps:
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
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
|
||||
- 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
|
||||
- name: Build and push bugis images
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: |
|
||||
@@ -54,6 +62,6 @@ jobs:
|
||||
pull: true
|
||||
tags: |
|
||||
"gitea.woggioni.net/woggioni/bugis:latest"
|
||||
"gitea.woggioni.net/woggioni/bugis:1.0"
|
||||
"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