Skip to content

Update README.md (#32) #4

Update README.md (#32)

Update README.md (#32) #4

name: Update README
on:
push:
branches:
- master
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout AI_generated folder
uses: actions/checkout@v4
with:
sparse-checkout: |
AI_generated/
- name: Find PNG files
id: find-files
run: |
png_files=$(find AI_generated -name '*.png' -printf '%P\n')
echo "PNG_FILES<<EOF" >> $GITHUB_ENV
echo "$png_files" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Update README
run: |
echo "## AI-Generated Artwork" > AI_generated/README.md
echo "" >> AI_generated/README.md
echo "This repository contains a collection of unique artwork generated by advanced AI algorithms. Each piece in the 'AI_generated' folder is generated using a ComfyUI workflow based on mostly SDXL and a controlnet for alignment to the ELAS logo." >> AI_generated/README.md
echo "" >> AI_generated/README.md
echo "Below is a showcase of the artwork available in this repository:" >> AI_generated/README.md
echo "" >> AI_generated/README.md
for file in $(echo "${{ env.PNG_FILES }}"); do
echo "### $file" >> AI_generated/README.md
echo "<img src=\"$file\" width=\"250\">" >> AI_generated/README.md
echo "" >> AI_generated/README.md
done
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add AI_generated/README.md
git commit -m "Update README with PNG files in AI_generated folder"
git push