5 Commits
v1.0.0 ... main

Author SHA1 Message Date
7675c2138e fix: Transform the conf file 🐛
All checks were successful
CI / release (push) Successful in 36s
2025-02-17 10:43:01 +13:00
c150a09f92 fix(ci): Add header for authorization 🐛
Some checks failed
CI / release (push) Failing after 1m24s
2025-02-17 10:31:36 +13:00
cc04f0e9aa fix(ci): Use go-semantic-release to download provider 🐛 💚
Some checks failed
CI / release (push) Failing after 1m26s
2025-02-17 10:20:43 +13:00
42ef0f96f6 feat: Add configurable TRANSPORT_SCHEME
Some checks failed
CI / release (push) Failing after 1m29s
Can now set environment var TRANSPORT_SCHEME=http if you would want to revert from default https transport.
2025-02-17 09:57:19 +13:00
a35bbe7c35 fix: Returned path to user organisation 💚
Some checks failed
CI / release (push) Failing after 28s
2024-06-09 23:19:56 +12:00
5 changed files with 11 additions and 17 deletions

View File

@@ -11,17 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install gitea provider for Go Semantic Release
run: |
mkdir -p .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/ && \
wget https://github.com/cybercinch/go-semantic-release-provider-gitea/releases/download/v${GITEA_PROVIDER_VER}/go-semantic-release-provider-gitea_v${GITEA_PROVIDER_VER}_linux_amd64 \
-O .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/gitea && \
chmod a+x .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/gitea
env:
GITEA_PROVIDER_VER: 1.0.11
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
@@ -49,6 +38,7 @@ jobs:
if: success()
with:
url: '${{ vars.NTFY_URL }}'
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_TOKEN }}" }'
topic: 'ci-status'
priority: 4
tags: +1,partying_face,action,successfully,completed
@@ -61,6 +51,7 @@ jobs:
if: failure()
with:
url: '${{ vars.NTFY_URL }}'
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_TOKEN }}" }'
topic: 'ci-status'
priority: 5
tags: +1,partying_face,action,failed

View File

@@ -14,7 +14,7 @@
"exec"
],
"options": {
"exec_on_success": "docker buildx build --progress=plain -t cybercinch/pypi-proxy:v{{.NewRelease.Version}} -t cybercinch/pypi-proxy:latest --push .",
"exec_on_success": "docker buildx build --progress=plain -t guisea/pypi-proxy:v{{.NewRelease.Version}} -t guisea/pypi-proxy:latest --push .",
"exec_on_no_release": "echo {{.Reason}}: {{.Message}}"
}
}

View File

@@ -18,6 +18,8 @@ VOLUME [ "/var/lib/nginx/pypi" ]
EXPOSE 80
ENV TZ=Pacific/Auckland
# Transport scheme default is https
ENV TRANSPORT_SCHEME=https
ENTRYPOINT [ "/docker-entrypoint.sh" ]

View File

@@ -81,8 +81,8 @@ http {
location / {
# Replace any reference to actual pypi w/ caching proxy
sub_filter 'https://pypi.org' $scheme://$host;
sub_filter 'https://files.pythonhosted.org' $scheme://%%PYPI_FILES_HOSTNAME%%;
sub_filter 'https://pypi.org' %%TRANSPORT_SCHEME%%://$host;
sub_filter 'https://files.pythonhosted.org' %%TRANSPORT_SCHEME%%://%%PYPI_FILES_HOSTNAME%%;
sub_filter_once off;
sub_filter_types '*';
proxy_pass https://pypi;
@@ -90,8 +90,8 @@ http {
}
location ^~ /simple {
sub_filter 'https://pypi.org' $scheme://$host;
sub_filter 'https://files.pythonhosted.org' $scheme://%%PYPI_FILES_HOSTNAME%%;
sub_filter 'https://pypi.org' %%TRANSPORT_SCHEME%%://$host;
sub_filter 'https://files.pythonhosted.org' %%TRANSPORT_SCHEME%%://%%PYPI_FILES_HOSTNAME%%;
sub_filter_types '*';
sub_filter_once off;
# Make sure URI ends with /
@@ -128,7 +128,7 @@ http {
location / {
# Replace any reference to actual pypi w/ caching proxy
sub_filter 'https://files.pythonhosted.org' $scheme://%%PYPI_FILES_HOSTNAME%%;
sub_filter 'https://files.pythonhosted.org' %%TRANSPORT_SCHEME%%://%%PYPI_FILES_HOSTNAME%%;
sub_filter_once off;
sub_filter_types '*';
proxy_pass https://pypi-files;

View File

@@ -11,6 +11,7 @@ fi
sed -i -e "s|%%PYPI_FILES_HOSTNAME%%|${PYPI_FILES_HOSTNAME}|g" \
-e "s|%%PYPI_HOSTNAME%%|${PYPI_HOSTNAME}|g" \
-e "s|%%TRANSPORT_SCHEME%%|${TRANSPORT_SCHEME}|g" \
/etc/nginx/nginx.conf
if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then