Skip to content

Commit

Permalink
feat: Add support for private pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
jarojasm95 committed Feb 12, 2025
1 parent 51a3a4c commit 388f8a5
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 31 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ scripts/dev/*
diagram
docs
config-example
.github
4 changes: 1 addition & 3 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
packages: write
id-token: write
steps:

- name: Check Out Repo
uses: actions/checkout@v2
- uses: actions/checkout@v4

# QEMU is needed to support multi-platform builds
- name: Set up QEMU
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
packages: write
id-token: write
steps:

- name: Check Out Repo
uses: actions/checkout@v2
- uses: actions/checkout@v4

# QEMU is needed to support multi-platform builds
- name: Set up QEMU
Expand Down Expand Up @@ -64,18 +62,33 @@ jobs:
werf export --repo ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} ${{ steps.werf-args.outputs.result }}
python:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- run: pip3 install poetry==2.0.1

- run: poetry build

- if: github.ref != 'refs/heads/main'
continue-on-error: true # remove once the connection to the PyPi cloud is setup
run: poetry publish -r fivestars -u fivestars -p ${{ secrets.PYPI_CLOUD_PASSWORD }}

cleanup:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- run: git fetch --prune --unshallow

- name: Cleanup
uses: werf/actions/cleanup@v2
- uses: werf/actions/cleanup@v2
with:
version: v2.26.6
env:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN python -m venv /root/.venv

ENV PATH /root/.venv/bin:$PATH
# also specified around line 48
ARG POETRY_VERSION=1.8.2
ARG POETRY_VERSION=2.0.1
ENV PATH /root/.local/bin:$PATH
RUN pip install --upgrade pip setuptools wheel && \
curl -sSL https://install.python-poetry.org -o install-poetry.py && \
Expand Down Expand Up @@ -46,7 +46,7 @@ RUN apt-get update && \
wget

# also specified around line 15
ARG POETRY_VERSION=1.8.2
ARG POETRY_VERSION=2.0.1
ENV PATH /root/.local/bin:$PATH
RUN pip install --upgrade pip setuptools wheel && \
curl -sSL https://install.python-poetry.org -o install-poetry.py && \
Expand Down
Loading

0 comments on commit 388f8a5

Please sign in to comment.