This repository has been archived by the owner on Nov 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- includes CI/CD for PyPI and Docker Hub
- Loading branch information
rix
committed
May 18, 2024
1 parent
87b3a80
commit 75cfa41
Showing
15 changed files
with
168 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Install / Update: | ||
|
||
`pip install -U altstore-proxy` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: rix1337 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build Image | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
env: | ||
ENDPOINT: "rix1337/docker-altstore-proxy" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: whoan/docker-build-with-cache-action@v6 | ||
with: | ||
username: "${{ secrets.DOCKERUSER }}" | ||
password: "${{ secrets.DOCKERPASS }}" | ||
image_name: "${{ env.ENDPOINT }}" | ||
context: "./docker" | ||
image_tag: latest | ||
stages_image_name: "rix1337/cache-altstore-proxy-latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Release Artifacts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Release Artifacts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('setup.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install requirements | ||
run: | | ||
pip install wheel | ||
pip install twine | ||
pip install -r requirements.txt | ||
- name: Compile Linux wheel | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Get Version | ||
run: echo "version=$(python altstore_proxy/version.py)" >>$GITHUB_OUTPUT | ||
id: version | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "./dist/*.whl" | ||
artifactErrorsFailBuild: true | ||
bodyFile: ".github/Changelog.md" | ||
tag: v.${{ steps.version.outputs.version }} | ||
- name: Upload to PyPI | ||
run: | | ||
python -m twine upload ./dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} | ||
- name: Trigger Docker Image build | ||
run: | | ||
curl -XPOST -u "${{ secrets.CR_USER }}:${{secrets.CR_PAT}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/rix1337/AltStore-Proxy/actions/workflows/BuildImage.yml/dispatches --data '{"ref": "main"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Regular base image update check | ||
on: | ||
schedule: | ||
- cron: "0 */6 * * *" | ||
|
||
env: | ||
IMAGE_BASE: lsiobase/alpine.python3 | ||
IMAGE: rix1337/docker-altstore-proxy | ||
|
||
jobs: | ||
check-base-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Docker Image Update Checker | ||
id: baseupdatecheck | ||
uses: lucacome/[email protected] | ||
with: | ||
base-image: ${{ env.IMAGE_BASE }} | ||
image: ${{ env.IMAGE }} | ||
- name: Trigger Docker Image build | ||
run: | | ||
curl -XPOST -u "${{ secrets.CR_USER }}:${{secrets.CR_PAT}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/AltStore-Proxy/actions/workflows/BuildImage.yml/dispatches --data '{"ref": "main"}' | ||
if: steps.baseupdatecheck.outputs.needs-updating == 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
# AltStore-Proxy | ||
# Projekt by https://github.com/rix1337 | ||
|
||
|
||
def get_version(): | ||
return "1.0.0" | ||
|
||
|
||
if __name__ == '__main__': | ||
print(get_version()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ghcr.io/linuxserver/baseimage-alpine:3.18 | ||
MAINTAINER rix1337 | ||
|
||
# build tools | ||
RUN apk add --no-cache build-base python3-dev py3-pip | ||
|
||
# setup | ||
RUN pip3 install --upgrade pip \ | ||
&& pip3 install wheel \ | ||
&& pip3 install altstore-proxy --no-cache-dir | ||
|
||
# add local files | ||
COPY root/ / | ||
|
||
# volumes and ports | ||
VOLUME /cache | ||
EXPOSE 8080 | ||
ENV PYTHONUNBUFFERED=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# AltStore-Proxy | ||
|
||
[![PyPI version](https://badge.fury.io/py/altstore-proxy.svg)](https://badge.fury.io/py/altstore-proxy) | ||
[![Github Sponsorship](https://img.shields.io/badge/support-me-red.svg)](https://github.com/users/rix1337/sponsorship) | ||
|
||
A simple proxy for slow AltStore servers. | ||
|
||
# Run | ||
``` | ||
docker run -d \ | ||
--name="AltStore-Proxy" \ | ||
-p port:8080 \ | ||
-v /path/to/cache/:/cache:rw \ | ||
rix1337/docker-altstore-proxy | ||
``` | ||
|
||
# Optional Parameters | ||
- `-e BASEURL` Base URL for the AltStore-Proxy (for reverse proxy usage) | ||
- `-e REPOS` Desired apps.json Repositories to Cache - comma separated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3.3' | ||
services: | ||
docker-altstore-proxy: | ||
container_name: AltStore-Proxy | ||
ports: | ||
- 'port:8080' | ||
volumes: | ||
- '/path/to/cache/:/cache:rw' | ||
environment: | ||
- baseurl=https://example.com | ||
- repos=OPTIONAL | ||
image: rix1337/docker-altstore-proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/sponsors/rix1337 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
pip install altstore-proxy -U -q | ||
|
||
chown -R abc:abc /config/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
─────────────────────────────────────── | ||
AltStore-Proxy | ||
─────────────────────────────────────── |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
exec altstore_proxy --port=8080 --cache=/cache --baseurl=$BASEURL --repos=$REPOS |