diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index b951e4e..b104391 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -9,7 +9,7 @@ on: schedule: - cron: '19 5 * * *' push: - branches: [ "master" ] + branches: [ "master", "pypy" ] # Publish semver tags as releases. tags: [ 'v*.*.*' ] pull_request: @@ -76,7 +76,7 @@ jobs: uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 with: context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7 + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index ebb3a13..1da9881 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,9 @@ -FROM python:3.12-alpine +FROM pypy:3.10-slim WORKDIR /usr/src/app COPY . . -RUN apk --no-cache add --virtual build-deps git build-base && \ - pip install --no-cache-dir --prefer-binary -r requirements.txt && \ - apk del build-deps +RUN pip install --no-cache-dir --prefer-binary -r requirements.txt -CMD [ "python", "./main.py" ] +CMD [ "pypy", "./sungrowmodbus2mqtt.py" ] diff --git a/main.py b/sungrowmodbus2mqtt.py similarity index 100% rename from main.py rename to sungrowmodbus2mqtt.py