Skip to content

Commit

Permalink
j2
Browse files Browse the repository at this point in the history
Signed-off-by: ClaytonTDM <claytontdm@gmail.com>
  • Loading branch information
ClaytonTDM committed Oct 8, 2024
1 parent 7930962 commit 6d5ebf9
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/gifToWebp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main # or your default branch name

permissions:
contents: write

jobs:
convert-and-commit:
runs-on: ubuntu-latest
Expand All @@ -28,17 +31,16 @@ jobs:
- name: Run conversion script
run: |
node convert.js
node gif-to-webp-converter.js
- name: Commit changes
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git diff --quiet && git diff --staged --quiet || git commit -m "Convert GIF files to WebP"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Convert GIF files to WebP"
git push
fi

0 comments on commit 6d5ebf9

Please sign in to comment.