Skip to content

Commit

Permalink
Merge pull request #178 from stynoo/master
Browse files Browse the repository at this point in the history
update github actions & build for both amd64 & arm64
  • Loading branch information
longstone authored Oct 26, 2024
2 parents 630a7c5 + 445a35b commit 26d2ccc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,38 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Update version file ⬆️
uses: brettdorrans/[email protected]
with:
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 }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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 }}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
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

RUN mkdir -p /src
COPY . /src

RUN cd /src && \
python3 ./setup.py install
pip install .

ENTRYPOINT ["withings-sync"]

0 comments on commit 26d2ccc

Please sign in to comment.