Upload files to "/" #9

Closed
Rajendra.Reddy wants to merge 23 commits from rajendra.reddy-patch-1 into testing
Showing only changes of commit 364762b206 - Show all commits

Protected
View File

@@ -2,18 +2,12 @@ name: Enforce Image Standards
on:
pull_request:
branches:
- main
- beta
- testing
- client
- staging
- production
types: [opened, synchronize, reopened]
paths:
- '**.jpg'
- '**.jpeg'
- '**.png'
#workflow_dispatch:
- '**/*.jpg'
- '**/*.jpeg'
- '**/*.png'
workflow_dispatch:
jobs:
optimize:
@@ -23,6 +17,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Debug Event
run: |
echo "Base: ${{ gitea.base_ref }}"
echo "Head: ${{ gitea.head_ref }}"
- name: Install Image Tools
run: |
sudo apt-get update
@@ -41,17 +40,4 @@ jobs:
- name: Optimize PNG
run: |
find . -type f -iname "*.png" \
-exec pngquant --force --ext .png --quality=75-90 {} \;
- name: Commit Optimized Images
run: |
git config --global user.name "gitea-actions"
git config --global user.email "actions@local"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Auto resize and optimize images"
git push origin HEAD:${{ gitea.head_ref }}
else
echo "No changes to commit"
fi
-exec pngquant --force --ext .png --quality=75-90 {} \;