Skip to content

Commit e70f598

Browse files
update python and dependencies
Signed-off-by: MrScarySpaceCat <me@mrscaryspacecat.dev>
1 parent 08de5d8 commit e70f598

File tree

3 files changed

+63
-84
lines changed

3 files changed

+63
-84
lines changed
Lines changed: 42 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
name: Docker
22

3-
# This workflow uses actions that are not certified by GitHub.
4-
# They are provided by a third-party and are governed by
5-
# separate terms of service, privacy policy, and support
6-
# documentation.
7-
83
on:
94
push:
105
branches: ["master"]
@@ -25,70 +20,50 @@ jobs:
2520
permissions:
2621
contents: read
2722
packages: write
28-
# This is used to complete the identity challenge
29-
# with sigstore/fulcio when running outside of PRs.
3023
id-token: write
3124

3225
steps:
33-
- name: Checkout repository
34-
uses: actions/checkout@v4
35-
36-
# Install the cosign tool except on PR
37-
# https://github.com/sigstore/cosign-installer
38-
- name: Install cosign
39-
if: github.event_name != 'pull_request'
40-
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
41-
with:
42-
cosign-release: "v2.2.4"
43-
44-
# Set up BuildKit Docker container builder to be able to build
45-
# multi-platform images and export cache
46-
# https://github.com/docker/setup-buildx-action
47-
- name: Set up Docker Buildx
48-
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
49-
50-
# Login against a Docker registry except on PR
51-
# https://github.com/docker/login-action
52-
- name: Log into registry ${{ env.REGISTRY }}
53-
if: github.event_name != 'pull_request'
54-
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
55-
with:
56-
registry: ${{ env.REGISTRY }}
57-
username: ${{ github.actor }}
58-
password: ${{ secrets.GITHUB_TOKEN }}
59-
60-
# Extract metadata (tags, labels) for Docker
61-
# https://github.com/docker/metadata-action
62-
- name: Extract Docker metadata
63-
id: meta
64-
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
65-
with:
66-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
26+
- name: Checkout repository
27+
uses: actions/checkout@v6.0.2
28+
29+
- name: Install cosign
30+
if: github.event_name != 'pull_request'
31+
uses: sigstore/cosign-installer@v4.1.1
6732

68-
# Build and push Docker image with Buildx (don't push on PR)
69-
# https://github.com/docker/build-push-action
70-
- name: Build and push Docker image
71-
id: build-and-push
72-
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
73-
with:
74-
context: .
75-
push: ${{ github.event_name != 'pull_request' }}
76-
tags: ${{ steps.meta.outputs.tags }}
77-
labels: ${{ steps.meta.outputs.labels }}
78-
cache-from: type=gha
79-
cache-to: type=gha,mode=max
33+
- name: Set up QEMU
34+
uses: docker/setup-qemu-action@v4.0.0
8035

81-
# Sign the resulting Docker image digest except on PRs.
82-
# This will only write to the public Rekor transparency log when the Docker
83-
# repository is public to avoid leaking data. If you would like to publish
84-
# transparency data even for private images, pass --force to cosign below.
85-
# https://github.com/sigstore/cosign
86-
- name: Sign the published Docker image
87-
if: ${{ github.event_name != 'pull_request' }}
88-
env:
89-
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
90-
TAGS: ${{ steps.meta.outputs.tags }}
91-
DIGEST: ${{ steps.build-and-push.outputs.digest }}
92-
# This step uses the identity token to provision an ephemeral certificate
93-
# against the sigstore community Fulcio instance.
94-
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v4.0.0
38+
39+
- name: Log into registry ${{ env.REGISTRY }}
40+
if: github.event_name != 'pull_request'
41+
uses: docker/login-action@v4.0.0
42+
with:
43+
registry: ${{ env.REGISTRY }}
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Extract Docker metadata
48+
id: meta
49+
uses: docker/metadata-action@v6.0.0 # v5.0.0
50+
with:
51+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
52+
53+
- name: Build and push Docker image
54+
id: build-and-push
55+
uses: docker/build-push-action@v7.0.0
56+
with:
57+
context: .
58+
push: ${{ github.event_name != 'pull_request' }}
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}
61+
cache-from: type=gha
62+
cache-to: type=gha,mode=max
63+
64+
- name: Sign the published Docker image
65+
if: ${{ github.event_name != 'pull_request' }}
66+
env:
67+
TAGS: ${{ steps.meta.outputs.tags }}
68+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
69+
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

Dockerfile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7
88

9-
ARG PYTHON_VERSION=3.13.5
10-
FROM python:${PYTHON_VERSION}-slim as base
9+
ARG PYTHON_VERSION=3.14.3
10+
FROM python:${PYTHON_VERSION}-slim-trixie as base
1111

1212
# Prevents Python from writing pyc files.
1313
ENV PYTHONDONTWRITEBYTECODE=1
@@ -21,13 +21,17 @@ WORKDIR /app
2121
# Create a non-privileged user that the app will run under.
2222
# See https://docs.docker.com/go/dockerfile-user-best-practices/
2323
ARG UID=10001
24-
RUN adduser \
25-
--disabled-password \
26-
--gecos "" \
27-
--home "/nonexistent" \
28-
--shell "/sbin/nologin" \
29-
--no-create-home \
24+
RUN groupadd \
25+
--gid "${UID}" \
26+
--system \
27+
appuser \
28+
&& useradd \
29+
--home-dir "/nonexistent" \
30+
--shell "/usr/sbin/nologin" \
3031
--uid "${UID}" \
32+
--gid "${UID}" \
33+
--no-log-init \
34+
--system \
3135
appuser
3236

3337
# Download dependencies as a separate step to take advantage of Docker's caching.

requirements.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ aiohttp~=3.13.3
44
aiosignal~=1.4.0
55
annotated-doc~=0.0.4
66
annotated-types~=0.7.0
7-
anyio~=4.11.0
8-
attrs~=25.4.0
7+
anyio~=4.13.0
8+
attrs~=26.1.0
99
bcrypt~=5.0.0
1010
beautifulsoup4~=4.14.3
1111
click~=8.3.1
1212
dnspython~=2.8.0
13-
fastapi~=0.121.3
13+
fastapi~=0.135.2
1414
frozenlist~=1.8.0
15-
greenlet~=3.2.4
15+
greenlet~=3.3.2
1616
h11~=0.16.0
1717
html5lib~=1.1
1818
idna~=3.11
@@ -22,20 +22,20 @@ lxml~=6.0.2
2222
MarkupSafe~=3.0.3
2323
motor~=3.7.1
2424
multidict~=6.7.0
25-
playwright~=1.56.0
25+
playwright~=1.58.0
2626
propcache~=0.4.1
2727
pur~=7.3.3
2828
pydantic~=2.12.5
2929
pydantic_core~=2.41.5
3030
pyee~=13.0.0
31-
pymongo~=4.15.5
31+
pymongo~=4.16.0
3232
python-multipart~=0.0.21
3333
six~=1.17.0
3434
sniffio~=1.3.1
3535
soupsieve~=2.8.1
36-
starlette~=0.49.3
36+
starlette~=1.0.0
3737
typing-inspection~=0.4.2
3838
typing_extensions~=4.15.0
39-
uvicorn~=0.38.0
39+
uvicorn~=0.42.0
4040
webencodings~=0.5.1
41-
yarl~=1.22.0
41+
yarl~=1.23.0

0 commit comments

Comments
 (0)