Skip to content

Update AgamBerger.jpg #25

Update AgamBerger.jpg

Update AgamBerger.jpg #25

Workflow file for this run

name: "Optimize images with TinyPNG"
on:
push:
paths:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- id: changed
uses: jitterbit/get-changed-files@v1
with:
format: "csv"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install tinify tqdm python-dotenv
- name: Tinify Images
run: |
if [ -z "${{ steps.changed.outputs.added_modified }}" ]; then
echo "No files changed, skipping"
exit 0
fi
python .github/scripts/tinify_images.py \
-d api/images \
-ff ${{ steps.changed.outputs.added_modified }} \
-k ${{ secrets.TINIFY_API_KEY }} \
|| exit 1
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "Optimize images with TinyPNG"