From a3e2937e03a18a688a8bc31e6faa88af50460e32 Mon Sep 17 00:00:00 2001 From: Edson Costa Date: Sat, 26 Aug 2023 02:20:28 -0300 Subject: [PATCH] ajuste de action --- .github/workflows/ImageOptimization.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ImageOptimization.yml b/.github/workflows/ImageOptimization.yml index 3961a82..b5458dc 100644 --- a/.github/workflows/ImageOptimization.yml +++ b/.github/workflows/ImageOptimization.yml @@ -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 "action@github.com" git config --local user.name "Image Optimization🧹" git commit -m "Optimize images" - git push origin developer + git push origin ${{ github.event.inputs.target-branch }}