Compare commits

...

7 Commits
v1.0.0 ... main

Author SHA1 Message Date
102c7a2b94 more fixes
All checks were successful
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 15s
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 15s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 25s
Release / build (push) Successful in 36s
Release / publish_head (push) Successful in 34s
2025-03-15 20:08:29 -04:00
74a010e82a more fixes
All checks were successful
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 15s
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 15s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 25s
Release / build (push) Successful in 36s
Release / publish_head (push) Successful in 34s
2025-03-15 20:03:58 -04:00
23ce3be362 more fixes
All checks were successful
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 14s
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 16s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 24s
Release / build (push) Successful in 35s
Release / publish_head (push) Successful in 35s
2025-03-15 20:01:07 -04:00
f12247b0b1 more fixes
All checks were successful
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 15s
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 14s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 20s
Release / build (push) Successful in 33s
Release / publish_head (push) Successful in 35s
2025-03-15 19:58:45 -04:00
2605f7db37 more fixes
All checks were successful
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 14s
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 15s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 20s
Release / build (push) Successful in 35s
Release / publish_head (push) Successful in 35s
2025-03-15 19:56:40 -04:00
3898a198bd add testing builds
All checks were successful
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 15s
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 15s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 24s
Release / build (push) Successful in 37s
Release / publish_head (push) Successful in 37s
2025-03-15 19:49:12 -04:00
d901f00c1f test fix image rotation
All checks were successful
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 15s
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 15s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 23s
2025-03-15 19:47:44 -04:00
2 changed files with 33 additions and 4 deletions

View File

@ -3,6 +3,9 @@ name: Release
on:
release:
types: [published]
push:
branches:
- main
jobs:
build:
@ -42,3 +45,28 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
publish_head:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: git.dws.rip
username: ${{ github.actor }}
password: ${{ secrets.GLOBAL_KEY }}
- name: Build and push "head" image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: git.dws.rip/${{ github.repository }}:head

View File

@ -30,15 +30,16 @@ def generate_thumbnail(image_path, resize_percent, min_width, max_width):
try:
exif = img.info['exif']
orientation = img._getexif().get(0x0112, 1) # 0x0112 is the EXIF orientation tag
print(f"EXIF orientation: {orientation}, {image_path}")
if orientation == 3:
img = img.rotate(180, expand=True)
elif orientation == 6:
img = img.rotate(270, expand=True)
img = img.rotate(0, expand=True)
elif orientation == 8:
img = img.rotate(90, expand=True)
img = img.rotate(180, expand=True)
except (AttributeError, KeyError, IndexError):
# cases: image don't have getexif
exif = None
exif = b""
# Save the thumbnail to a BytesIO object
thumbnail_io = BytesIO()