8 Commits

Author SHA1 Message Date
9955367fa7 chore(pip-prod)(deps): bump charset-normalizer from 3.4.0 to 3.4.1
Bumps [charset-normalizer](https://github.com/jawah/charset_normalizer) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/jawah/charset_normalizer/releases)
- [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jawah/charset_normalizer/compare/3.4.0...3.4.1)

---
updated-dependencies:
- dependency-name: charset-normalizer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-26 11:48:30 +00:00
f394a853c1 feat(docker): Add docker image 2024-12-25 11:36:21 +00:00
f31c59da5b fix(ci): move pyproject.toml update to script file 2024-12-25 11:25:24 +00:00
3293ac0d53 chore(ci): cat pyproject.toml 2024-12-25 11:19:47 +00:00
bba8af2b06 fix(ci): correctly update version number in pyproject.toml 2024-12-25 11:13:50 +00:00
c3b5470f6f fix(ci): update pyproject.toml dynamically 2024-12-25 10:55:28 +00:00
e95a08b87e fix(ci): update pyproject.toml dynamically 2024-12-25 10:38:12 +00:00
049ea70bb3 fix(ci): run tests before creating release 2024-12-25 10:26:03 +00:00
4 changed files with 46 additions and 7 deletions

View File

@ -15,6 +15,7 @@ jobs:
create_release: create_release:
name: Create Release name: Create Release
needs: test
uses: luketainton/gha-workflows/.github/workflows/create-release.yml@main uses: luketainton/gha-workflows/.github/workflows/create-release.yml@main
build: build:
@ -29,14 +30,11 @@ jobs:
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.11"
- name: Update pyproject.toml
run:
prefix="v"
string="${{ needs.create_release.outputs.release_name }}"
versionname=${string#"$prefix"}
sed -i "s@version = \"0.0.0\"@version = \"${versionname}\"@g" pyproject.toml
- name: Setup Poetry - name: Setup Poetry
uses: abatilo/actions-poetry@v3 uses: abatilo/actions-poetry@v3
- name: Update pyproject.toml
run:
./tools/update_pyproject.sh ${{ needs.create_release.outputs.release_name }}
- name: Install dependencies - name: Install dependencies
run: poetry install run: poetry install
- name: Build wheel file - name: Build wheel file
@ -72,3 +70,11 @@ jobs:
path: dist path: dist
- name: Publish to PyPI - name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 uses: pypa/gh-action-pypi-publish@release/v1
create_docker:
name: Create Docker Image
needs: create_release
if: ${{ needs.create_release.outputs.success == 'true' }}
uses: luketainton/gha-workflows/.github/workflows/build-push-attest-docker.yml@main
with:
release: ${{ needs.create_release.outputs.release_name }}

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM python:3.11-slim
LABEL maintainer="Luke Tainton <luke@tainton.uk>"
LABEL org.opencontainers.image.source="https://github.com/luketainton/pypilot"
USER root
ENV PYTHONPATH="/run:/usr/local/lib/python3.11/lib-dynload:/usr/local/lib/python3.11/site-packages:/usr/local/lib/python3.11"
WORKDIR /run
RUN mkdir -p /.local && \
chmod -R 777 /.local && \
pip install -U pip poetry
COPY pyproject.toml /run/pyproject.toml
COPY poetry.lock /run/poetry.lock
RUN poetry config virtualenvs.create false && \
poetry install --without dev
ENTRYPOINT ["python3", "-B", "-m", "app.main"]
ARG version="dev"
ENV APP_VERSION=$version
COPY ipilot /run/app

View File

@ -1,7 +1,7 @@
astroid==3.2.4 astroid==3.2.4
attrs==24.3.0 attrs==24.3.0
certifi==2024.12.14 certifi==2024.12.14
charset-normalizer==3.4.0 charset-normalizer==3.4.1
click==8.1.8 click==8.1.8
dill==0.3.9 dill==0.3.9
exceptiongroup==1.2.2 exceptiongroup==1.2.2

9
tools/update_pyproject.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
OLD_VERSION=$(grep ^version pyproject.toml | cut -d '"' -f 2)
echo "OLD_VERSION: $OLD_VERSION"
OLD_VERSION="\"$OLD_VERSION\""
NEW_VERSION=$(echo "$1" | cut -d '"' -f 2 | cut -d 'v' -f 2)
echo "NEW_VERSION: $NEW_VERSION"
NEW_VERSION="\"$NEW_VERSION\""
sed -i "s+version = $OLD_VERSION+version = $NEW_VERSION+g" pyproject.toml