Skip to content

Commit

Permalink
automation
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Apr 26, 2024
1 parent ee9182f commit 67637e2
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Update Image List

permissions: write-all

on:
push:
paths:
- "*.png"
workflow_dispatch:

jobs:
sponsor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true

- uses: pnpm/action-setup@v3
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- uses: pdm-project/setup-pdm@v3

- name: Run Job
run: |-
# pdm install # no 3rd lib used
pdm run generate
pnpm i
pnpm format
if [[ -n "$(git status -s)" ]]; then
git add .
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git commit -m "Update Image List"
git push
else
echo "No changes detected."
fi

0 comments on commit 67637e2

Please sign in to comment.