Initial commit

This commit is contained in:
Karl 2025-05-17 10:50:15 +01:00
parent b0bb465cf7
commit 7dd90bb032
5 changed files with 95 additions and 21 deletions

10
.bumpversion.toml Normal file
View File

@ -0,0 +1,10 @@
[bumpversion]
current_version = "0.1.0"
commit = true
tag = true
tag_name = "{new_version}"
[[file]]
filename = "__version__.py"
parse = '__version__\s*=\s*"(?P<version>.*)"'
serialize = '__version__ = "{new_version}"'

View File

@ -1,47 +1,55 @@
name: Build and Publish Docker Image
name: Build, Update Version and Publish Docker Image
on:
push:
branches: [main]
tags: ['*'] # triggers on any tag push
tags: ['*']
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install bump2version
run: pip install bump2version
# Bump patch version, commit, and push back to repo (only on main branch)
- name: Bump version and push
if: github.ref == 'refs/heads/main'
run: |
bump2version patch --allow-dirty
git push origin main --follow-tags
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Registry
run: echo "${{ secrets.PASSWORD }}" | docker login ${{ secrets.REGISTRY }} -u "${{ secrets.USERNAME }}" --password-stdin
- name: Get version from file
id: get_version
run: |
VERSION=$(python -c "import myproject.__version__ as v; print(v.__version__)")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build and Push Docker Images
run: |
IMAGE_NAME="ai-frame-image-server"
REGISTRY="${{ secrets.REGISTRY }}"
USERNAME="${{ secrets.USERNAME }}"
IMAGE_LATEST="$REGISTRY/$USERNAME/$IMAGE_NAME:latest"
VERSION="${{ steps.get_version.outputs.version }}"
IMAGE_TAG="$REGISTRY/$USERNAME/$IMAGE_NAME:$VERSION"
# Always build and tag as latest
echo "🔧 Building $IMAGE_LATEST"
docker build -t $IMAGE_LATEST .
echo "🔧 Building $IMAGE_TAG"
docker build -t $IMAGE_TAG .
echo "📤 Pushing $IMAGE_LATEST"
docker push $IMAGE_LATEST
# If this is a tag push, tag the image accordingly
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
GIT_TAG="${GITHUB_REF#refs/tags/}"
IMAGE_TAGGED="$REGISTRY/$USERNAME/$IMAGE_NAME:$GIT_TAG"
echo "🏷️ Also tagging as $IMAGE_TAGGED"
docker tag $IMAGE_LATEST $IMAGE_TAGGED
echo "📤 Pushing $IMAGE_TAGGED"
docker push $IMAGE_TAGGED
fi
echo "📤 Pushing $IMAGE_TAG"
docker push $IMAGE_TAG

1
__version__.py Normal file
View File

@ -0,0 +1 @@
__version__ = "0.1.0"

55
d Normal file
View File

@ -0,0 +1,55 @@
b0bb465 (HEAD -> main, tag: 0.1.0) add style for mobile
4ec98eb working lazyloading
c3f0a70 working lightbox navifation with js cache for details
636148b only load details when loading image in lightbox
cf9f5d0 cleanup and show modle name on gallery
ab1c0c3 (origin/main) fix SDXL workflow
8be2111 image queued page
0ccebcf add back button to the bottom of the gallery
da37913 add create_image page
aef0afe wrong key name
e88d490 fix the random model logic
ee18289 yaml not sh
1a3e657 test commit to see if the workflow works
26d9f38 updated workflow
2c5dbdb try create workflow to auto publish new container
e43ab87 replace image.png thumbnail
073cc3b update flux logic
41fd144 re working into libs, and use thumbs in gallery
020c2c2 updated styling and prompt on home page
4acf28e update path for flux
9aea4e6 fix sorting and sdxl workflow prompt text
81140d7 updated logic to show prompt on the lightbox display
cce1cb2 lazy load images
dcc6f94 re-add topic logic
b93d070 update gitignore
7c4ec9e Ignore publish.sh
3e974d5 fixed logic
eb59cfa wrong key
b92366f spelling mistake
60be7c4 randomly select dev/schnell when using flux
ab50f2a add publish script
c4b9dd2 last 7 prompts not 7 days
30d25d1 rework to single flow
a180a7b working flux and sdxl
2bbb2fe allow flux workflow
6fdfb51 support multiple models and random selection
e4428b4 return generated prompt, allow job to be cancelled
91c48b5 fix double running job
d32e903 retry logic, create endpoint now non blocking
42c8a2b sort gallery by new-old, move to -slim docker image
5ab4d76 strange indent
db9b961 formatting and docstrings
dcc0cdc move gallery to /images
0838f37 bigger gallery
342416a arrow cycle
6cc30bd add /gallery to show all generated images
290c1ba support auto image regeneration at specific time
d97ef3f add support for multiple models and posting a prompt to /create
0e471d7 update negative prompt
1fba2da docker compose file
8064c90 user config controls reload interval
4fd857c fill as much as possible
26e8d90 add flask to requirements
fc0b1f3 update with docker server
6ada0bf initial commit

Binary file not shown.