Add meme-1772193475352.png #32
This file contains hidden or 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
| name: Auto Merge | |
| on: | |
| pull_request: | |
| types: [opened] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| auto-merge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Merge PR | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| await github.rest.pulls.merge({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| merge_method: 'squash' | |
| }); | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Generate images.json | |
| run: | | |
| echo "[" > images.json | |
| first=true | |
| for img in memes/*.{png,jpg,jpeg,gif,webp}; do | |
| if [ -f "$img" ]; then | |
| [ "$first" = true ] && first=false || echo "," >> images.json | |
| echo " \"$img\"" >> images.json | |
| fi | |
| done | |
| echo "]" >> images.json | |
| - name: Commit | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add images.json | |
| git diff --quiet && git diff --staged --quiet || git commit -m "update images.json" | |
| git push |