diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index db5133b..d1c7df8 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -17,10 +17,10 @@ jobs: filename: '.VERSION' placeholder: '${VERSION}' - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install pypa/build run: >- diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3f1ee2d..dea5da5 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Update version file ⬆️ uses: brettdorrans/write-version-to-file@v1.1.0 @@ -36,8 +36,14 @@ jobs: filename: '.VERSION' placeholder: '${VERSION}' + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -45,14 +51,15 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image 📦 to ghcr - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v6 with: context: . push: true + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 8ac24a5..deead53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM python:3.10-alpine +FROM python:3.12-alpine # Install python-lxml RUN apk add --no-cache --virtual .build-deps \ gcc musl-dev \ libxslt-dev libxml2-dev && \ - pip install lxml && \ + pip install lxml setuptools && \ apk del .build-deps && \ apk add --no-cache libxslt libxml2 @@ -12,6 +12,6 @@ RUN mkdir -p /src COPY . /src RUN cd /src && \ - python3 ./setup.py install + pip install . ENTRYPOINT ["withings-sync"]