-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,12 @@ name: Image Optimization | |
|
||
on: | ||
workflow_dispatch: | ||
|
||
inputs: | ||
target-branch: | ||
description: 'Target Branch for Commit' | ||
required: true | ||
default: 'developer' | ||
|
||
jobs: | ||
optimize-images: | ||
runs-on: ubuntu-latest | ||
|
@@ -33,9 +38,12 @@ jobs: | |
find . -type f -name "*.jpg" -exec jpegoptim {} \; | ||
find . -type f -name "*.svg" -exec svgo {} \; | ||
- name: Commit and Push Changes | ||
- name: Add Changes | ||
run: git add . | ||
|
||
- name: Commit Changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Image Optimization🧹" | ||
git commit -m "Optimize images" | ||
git push origin developer | ||
git push origin ${{ github.event.inputs.target-branch }} |