Skip to content

Commit c3d0b99

Browse files
authored
Merge pull request #60 from icgood/platforms
Publish arm64 and amd64 docker images
2 parents 5c79ced + 9381f91 commit c3d0b99

8 files changed

Lines changed: 25 additions & 21 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
1721
- name: Login to GitHub Container Registry
18-
if: github.event_name != 'pull_request'
1922
uses: docker/login-action@v3
23+
if: github.event_name != 'pull_request'
2024
with:
2125
registry: ghcr.io
2226
username: ${{ github.actor }}
@@ -39,6 +43,7 @@ jobs:
3943
with:
4044
context: .
4145
file: ./docker/Dockerfile
46+
platforms: linux/amd64,linux/arm64
4247
push: ${{ github.event_name != 'pull_request' }}
4348
tags: ${{ steps.meta.outputs.tags }}
4449
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/python-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
name: check
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
6+
push:
7+
branches: [ main ]
88

99
jobs:
1010
build:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
platform: [ubuntu-latest, macos-latest, windows-latest]
14+
platform: [ubuntu-latest, windows-latest]
1515

1616
runs-on: ${{ matrix.platform }}
1717

1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Set up Python
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
2222
with:
2323
python-version: |
2424
3.8

.github/workflows/python-doc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: doc
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
6+
push:
7+
branches: [ main ]
88
release:
99
types: [ published ]
1010

@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717
- name: Set up Python
18-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: '3.12'
2121
- name: Install build tools
@@ -26,7 +26,7 @@ jobs:
2626
hatch run doc:build
2727
- name: Deploy to GitHub Pages
2828
if: github.event_name == 'release'
29-
uses: peaceiris/actions-gh-pages@v3
29+
uses: peaceiris/actions-gh-pages@v4
3030
with:
3131
github_token: ${{ github.token }}
3232
publish_dir: ./doc/build/html

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- name: Set up Python
14-
uses: actions/setup-python@v4
14+
uses: actions/setup-python@v5
1515
with:
1616
python-version: '3.12'
1717
- name: Install build tools

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PROXY protocol library with [asyncio][2] server implementation.
66
[![build](https://github.com/icgood/proxy-protocol/actions/workflows/python-check.yml/badge.svg)](https://github.com/icgood/proxy-protocol/actions/workflows/python-check.yml)
77
[![PyPI](https://img.shields.io/pypi/v/proxy-protocol.svg)](https://pypi.python.org/pypi/proxy-protocol)
88
[![PyPI](https://img.shields.io/pypi/pyversions/proxy-protocol.svg)](https://pypi.python.org/pypi/proxy-protocol)
9-
![platforms](https://img.shields.io/badge/platform-linux%20%7C%20macOS%20%7C%20windows-blueviolet)
9+
![platforms](https://img.shields.io/badge/platform-linux%20%7C%20windows-blueviolet)
1010
[![PyPI](https://img.shields.io/pypi/l/proxy-protocol.svg)](https://pypi.python.org/pypi/proxy-protocol)
1111

1212
#### [Specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt)

docker/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
FROM python:3.12-alpine
1+
FROM python:3.12-slim
22

33
WORKDIR /src
44
COPY . .
55

6-
RUN pip install -U pip wheel setuptools hatch typing-extensions
7-
8-
RUN apk --update add --virtual build-dependencies python3-dev build-base \
9-
&& hatch env create docker \
10-
&& apk del build-dependencies
6+
RUN pip install hatch
7+
RUN hatch env create docker
118

129
ENTRYPOINT ["hatch", "-e", "docker", "run", "proxyprotocol-server"]
1310
CMD ["--help"]

proxyprotocol/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#: The package version string.
2-
__version__ = '0.11.2'
2+
__version__ = '0.11.3'

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@ module = 'crc32c.*'
9797
ignore_missing_imports = true
9898

9999
[tool.ruff]
100+
line-length = 79
101+
102+
[tool.ruff.lint]
100103
select = ['ANN', 'B', 'E', 'F', 'N', 'S', 'W']
101104
ignore = ['ANN101', 'ANN102', 'ANN401', 'S101']
102-
line-length = 79
103105

104-
[tool.ruff.per-file-ignores]
106+
[tool.ruff.lint.per-file-ignores]
105107
"test/*" = ['ANN', 'S104']
106108

107109
[tool.autopep8]
@@ -127,7 +129,7 @@ features = ['dev', 'crc32c']
127129
[tool.hatch.envs.default.scripts]
128130
run-pytest = 'py.test --cov-report=term-missing --cov=proxyprotocol'
129131
run-mypy = 'mypy proxyprotocol test'
130-
run-ruff = 'ruff proxyprotocol test'
132+
run-ruff = 'ruff check proxyprotocol test'
131133
run-autopep8 = 'autopep8 --exit-code -dr proxyprotocol test'
132134
check = ['run-pytest', 'run-autopep8', 'run-mypy', 'run-ruff']
133135

0 commit comments

Comments
 (0)