-
-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (41 loc) · 1.73 KB
/
readme_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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