Skip to content

autostart

autostart #101

Workflow file for this run

name: Textfiles
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "create"
create:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a set of commands using the runners shell
- name: create
run: |
IFS=$'\n'
cd inspiration
rm -rf `ls | grep -v 'avatars.yaml'`
VAR="$(curl https://raw.githubusercontent.com/easydiffusion/easydiffusion/main/ui/modifiers.json)"
for c in $(echo "$VAR" | jq '.[].category'); do
words=$(echo "$VAR" | jq ".[] | select (.category==$c).modifiers[].modifier" | sed 's+"++g')
category="$(echo $c | sed 's+"++g')"
echo "$words" > "$category.txt"
echo "$category:" >> tags.yaml
echo " $category:" >> tags.yaml
for i in $(cat $category.txt); do
echo " $i:" >> tags.yaml
echo " value: \"$i\"" >> tags.yaml
done
echo >> tags.yaml
done
# Commits updated scripts
- uses: EndBug/add-and-commit@main
with:
add: inspiration