diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml new file mode 100644 index 00000000..c44aee1b --- /dev/null +++ b/.github/workflows/publish-docker.yml @@ -0,0 +1,59 @@ +name: Publish Docker image + +on: + release: + types: [published] + +jobs: + push_prod_to_registries: + name: Push Docker image to multiple registries + runs-on: ubuntu-latest + env: + REGISTRY: ghcr.io + IMAGE_NAME: retrofor/iamai-prod + permissions: + packages: write + contents: read + attestations: write + id-token: write + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: | + ghcr.io/${{ github.repository }} + + - name: Build and push Docker images + id: push + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + with: + context: . + file: ./Dockerfile.prod + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true diff --git a/Cargo.lock b/Cargo.lock index df6090d4..e2e98b2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ dependencies = [ [[package]] name = "iamai" -version = "0.0.4" +version = "0.1.4" dependencies = [ "pyo3", "rand", diff --git a/Cargo.toml b/Cargo.toml index 6f9ad469..6b912770 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "iamai" -version = "0.0.4" +version = "0.1.4" edition = "2021" description = "Comprehensive AI Toolkit for Multimodal Learning and Cross-Platform Robotics." license = "MIT" diff --git a/Dockerfile b/Dockerfile index 013a91b9..3640e9e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM python:3.10 LABEL maintainer="HsiangNianian " -LABEL org.opencontainers.image.description "A simple iamai examples with python 3.10" RUN apt-get update && \ apt-get install -y curl && \ diff --git a/Dockerfile.prod b/Dockerfile.prod index 0426d78d..ae76f7ee 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,5 +1,8 @@ FROM python:3.10 +LABEL maintainer="HsiangNianian " +LABEL org.opencontainers.image.description="A simple iamai examples with python 3.10" + WORKDIR /app ADD /examples /app/ diff --git a/packages/iamai-adapter-apscheduler/pyproject.toml b/packages/iamai-adapter-apscheduler/pyproject.toml index e7fa7bb9..1ac77e1b 100644 --- a/packages/iamai-adapter-apscheduler/pyproject.toml +++ b/packages/iamai-adapter-apscheduler/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iamai-adapter-apscheduler" -version = "0.0.4" +version = "0.1.4" description = "apscheduler adapter for iamai." authors = [{ name = "简律纯", email = "i@jyunko.cn" }] license = { text = "MIT" } @@ -18,7 +18,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "iamai>=0.0.3", + "iamai>=0.0.4", "apscheduler>=3.10.4", ] @@ -34,7 +34,4 @@ include = ["iamai/adapter/apscheduler"] [build-system] requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.uv.sources] -iamai = { workspace = true } \ No newline at end of file +build-backend = "hatchling.build" \ No newline at end of file diff --git a/packages/iamai-adapter-bililive/pyproject.toml b/packages/iamai-adapter-bililive/pyproject.toml index de4c17db..e775c556 100644 --- a/packages/iamai-adapter-bililive/pyproject.toml +++ b/packages/iamai-adapter-bililive/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iamai-adapter-bililive" -version = "0.0.4" +version = "0.1.4" description = "bililive adapter for iamai." authors = [{ name = "简律纯", email = "i@jyunko.cn" }] license = { text = "MIT" } @@ -17,7 +17,7 @@ classifiers = [ "Topic :: Communications :: Chat", ] requires-python = ">=3.9" -dependencies = ["iamai>=0.0.3"] +dependencies = ["iamai>=0.0.4"] [project.urls] Homepage = "https://iamai.is-a.dev/" @@ -31,7 +31,4 @@ include = ["iamai/adapter/bililive"] [build-system] requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.uv.sources] -iamai = { workspace = true } \ No newline at end of file +build-backend = "hatchling.build" \ No newline at end of file diff --git a/packages/iamai-adapter-console/pyproject.toml b/packages/iamai-adapter-console/pyproject.toml index c9f58781..be3a82d2 100644 --- a/packages/iamai-adapter-console/pyproject.toml +++ b/packages/iamai-adapter-console/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iamai-adapter-console" -version = "0.0.4" +version = "0.1.4" description = "Console adapter for iamai." authors = [{ name = "简律纯", email = "i@jyunko.cn" }] license = { text = "MIT" } @@ -17,7 +17,7 @@ classifiers = [ "Topic :: Communications :: Chat", ] requires-python = ">=3.9" -dependencies = ["iamai>=0.0.3"] +dependencies = ["iamai>=0.0.4"] [project.urls] Homepage = "https://iamai.is-a.dev/" @@ -31,7 +31,4 @@ include = ["iamai/adapter/console"] [build-system] requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.uv.sources] -iamai = { workspace = true } \ No newline at end of file +build-backend = "hatchling.build" \ No newline at end of file diff --git a/packages/iamai-adapter-cqhttp/pyproject.toml b/packages/iamai-adapter-cqhttp/pyproject.toml index ccd7241d..5785933d 100644 --- a/packages/iamai-adapter-cqhttp/pyproject.toml +++ b/packages/iamai-adapter-cqhttp/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iamai-adapter-cqhttp" -version = "0.0.4" +version = "0.1.4" description = "CQHTTP adapter for iamai." authors = [{ name = "简律纯", email = "i@jyunko.cn" }] license = { text = "MIT" } @@ -18,7 +18,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "iamai>=0.0.3", + "iamai>=0.0.4", ] [project.urls] @@ -31,14 +31,9 @@ Changelog = "https://iamai.is-a.dev/changelog.html" exclude = ["iamai/__init__.py", "iamai/adapter/__init__.py"] include = ["iamai/adapter/cqhttp"] - [tool.pdm] [tool.pdm.dev-dependencies] dev = [] [build-system] requires = ["hatchling"] -build-backend = "hatchling.build" - - -[tool.uv.sources] -iamai = { workspace = true } \ No newline at end of file +build-backend = "hatchling.build" \ No newline at end of file diff --git a/packages/iamai-adapter-dingtalk/pyproject.toml b/packages/iamai-adapter-dingtalk/pyproject.toml index be4096b7..9407d7ff 100644 --- a/packages/iamai-adapter-dingtalk/pyproject.toml +++ b/packages/iamai-adapter-dingtalk/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iamai-adapter-dingtalk" -version = "0.0.4" +version = "0.1.4" description = "Dingtalk adapter for iamai." authors = [{ name = "简律纯", email = "i@jyunko.cn" }] license = { text = "MIT" } @@ -17,7 +17,7 @@ classifiers = [ "Topic :: Communications :: Chat", ] requires-python = ">=3.9" -dependencies = ["iamai>=0.0.3"] +dependencies = ["iamai>=0.0.4"] [project.urls] Homepage = "https://iamai.is-a.dev/" @@ -31,7 +31,4 @@ include = ["iamai/adapter/dingtalk"] [build-system] requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.uv.sources] -iamai = { workspace = true } \ No newline at end of file +build-backend = "hatchling.build" \ No newline at end of file diff --git a/packages/iamai-adapter-gensokyo/pyproject.toml b/packages/iamai-adapter-gensokyo/pyproject.toml index e1d8c543..2b99b50e 100644 --- a/packages/iamai-adapter-gensokyo/pyproject.toml +++ b/packages/iamai-adapter-gensokyo/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iamai-adapter-gensokyo" -version = "0.0.4" +version = "0.1.4" description = "Gensokyo adapter for iamai." authors = [{ name = "简律纯", email = "i@jyunko.cn" }] license = { text = "MIT" } @@ -17,7 +17,7 @@ classifiers = [ "Topic :: Communications :: Chat", ] requires-python = ">=3.9" -dependencies = ["iamai>=0.0.3"] +dependencies = ["iamai>=0.0.4"] [project.urls] Homepage = "https://iamai.is-a.dev/" @@ -31,7 +31,4 @@ include = ["iamai/adapter/gensokyo"] [build-system] requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.uv.sources] -iamai = { workspace = true } \ No newline at end of file +build-backend = "hatchling.build" \ No newline at end of file diff --git a/packages/iamai-adapter-kook/pyproject.toml b/packages/iamai-adapter-kook/pyproject.toml index a7743c99..cb8b3923 100644 --- a/packages/iamai-adapter-kook/pyproject.toml +++ b/packages/iamai-adapter-kook/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iamai-adapter-kook" -version = "0.0.4" +version = "0.1.4" description = "kook adapter for iamai." authors = [{ name = "简律纯", email = "i@jyunko.cn" }] license = { text = "MIT" } @@ -17,7 +17,7 @@ classifiers = [ "Topic :: Communications :: Chat", ] requires-python = ">=3.9" -dependencies = ["iamai>=0.0.3"] +dependencies = ["iamai>=0.0.4"] [project.urls] Homepage = "https://iamai.is-a.dev/" @@ -31,7 +31,4 @@ include = ["iamai/adapter/kook"] [build-system] requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.uv.sources] -iamai = { workspace = true } \ No newline at end of file +build-backend = "hatchling.build" \ No newline at end of file diff --git a/packages/iamai-adapter-red/pyproject.toml b/packages/iamai-adapter-red/pyproject.toml index 0e1dcd08..73ac27b6 100644 --- a/packages/iamai-adapter-red/pyproject.toml +++ b/packages/iamai-adapter-red/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "iamai-adapter-red" -version = "0.0.4" +version = "0.1.4" description = "Red adapter for iamai." authors = [{ name = "简律纯", email = "i@jyunko.cn" }] license = { text = "MIT" } @@ -17,7 +17,7 @@ classifiers = [ "Topic :: Communications :: Chat", ] requires-python = ">=3.9" -dependencies = ["iamai>=0.0.3"] +dependencies = ["iamai>=0.0.4"] [project.urls] Homepage = "https://iamai.is-a.dev/" @@ -31,7 +31,4 @@ include = ["iamai/adapter/red"] [build-system] requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.uv.sources] -iamai = { workspace = true } \ No newline at end of file +build-backend = "hatchling.build" \ No newline at end of file diff --git a/pdm.lock b/pdm.lock index 619e289a..99d9b010 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev", "docs", "lint"] strategy = [] lock_version = "4.5.0" -content_hash = "sha256:431ade1621774d7df807f0ea38a40bbe7c5a7ca4b8c28cc996d5891d71bc54ee" +content_hash = "sha256:26557966429ef524a84145e2019017efdbf761830dbece52acf8722c98f21d4c" [[metadata.targets]] requires_python = "==3.10.15" diff --git a/pyproject.toml b/pyproject.toml index 450f065e..bd485bb0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "tomli>=2.0.0", "pydantic>=2.0.3,<3.0.0", "aiohttp>=3.9.1", "loguru>=0.7.0,<0.8.0",