diff --git a/.github/workflows/validate-images.yml b/.github/workflows/validate-images.yml index 76a842c..6411edd 100644 --- a/.github/workflows/validate-images.yml +++ b/.github/workflows/validate-images.yml @@ -11,17 +11,25 @@ jobs: process-images: runs-on: ubuntu-latest permissions: - contents: write # Needed to push the GALLERY.md update + contents: write steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Install ImageMagick + run: | + sudo apt-get update + sudo apt-get install -y imagemagick + - name: Validate PNG dimensions run: | + # Find all pngs in the 800x480 directory FILES=$(find screens/800x480 -name "*.png") for FILE in $FILES; do + echo "Validating $FILE" + # Extract dimensions DIMENSIONS=$(identify -format "%wx%h" "$FILE") if [ "$DIMENSIONS" != "800x480" ]; then echo "::error file=$FILE::Invalid dimensions: $DIMENSIONS. Must be 800x480." diff --git a/generate_gallery.py b/generate_gallery.py index 1557435..79d1388 100644 --- a/generate_gallery.py +++ b/generate_gallery.py @@ -4,7 +4,7 @@ import urllib.parse # Configuration BASE_DIR = "screens/800x480" OUTPUT_FILE = "GALLERY_800x480.md" -REPO_URL = "https://github.com/usetrmnl/trmnl-designs/raw/main" +REPO_URL = "https://github.com/usetrmnl/tailor/raw/main" def generate_gallery(): # Adjusted title and back-link reference for the specific size