Skip to content

remove dror kaplan, update bios, add emily damari #26

remove dror kaplan, update bios, add emily damari

remove dror kaplan, update bios, add emily damari #26

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
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add api/images
git commit -m "Optimize images with TinyPNG"
git push