From 562ddc60e29b472fb7c34ec205c6e1a286618f78 Mon Sep 17 00:00:00 2001 From: WalkxCode Date: Fri, 22 Apr 2022 13:32:36 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(ghactions):=20Try=20GitHub=20a?= =?UTF-8?q?ctions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update_readme.yml | 32 +++++++++++++++++++++++++++++ scripts/generate_readme.py | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update_readme.yml diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml new file mode 100644 index 0000000..cadac83 --- /dev/null +++ b/.github/workflows/update_readme.yml @@ -0,0 +1,32 @@ +name: Update Readme + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: "3.9" + architecture: "x64" + + - name: Update Readme + run: |- + python ./scripts/generate_readme.py + cat README.md + + - name: Load to GitHub + run: |- + git diff + git config --global user.email "readmebot@walkx.org" + git config --global user.name "Readme Bot" + git add -A + git commit -m "✨ feat(add): Update Readme" || exit 0 + git push + diff --git a/scripts/generate_readme.py b/scripts/generate_readme.py index 72e6e61..22f3ec7 100755 --- a/scripts/generate_readme.py +++ b/scripts/generate_readme.py @@ -9,7 +9,7 @@ if __name__ == "__main__": imgs = sorted(Path("../png").glob("*.png")) img_tags = [generate_img_tag(x) for x in imgs] - with open("README.md", "wt", encoding="UTF-8") as f: + with open("../README.md", "wt", encoding="UTF-8") as f: f.write("

\n") f.write("

Dashboard Icons

\n") f.write("\n")