Merge branch 'main' of https://github.com/puksh/puksh.github.io #4
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
name: Generate Image List | |
on: | |
push: | |
paths: | |
- 'images/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Generate Image List | |
run: | | |
echo "var imageList = [" > imageList.js | |
ls images/* | xargs -I {} echo "'{}'," >> imageList.js | |
echo "];" >> imageList.js | |
- name: Commit and Push | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add imageList.js | |
git commit -m "Update image list" -a | |
git push |