mirror of
https://github.com/Mayccoll/Gogh.git
synced 2023-08-10 21:12:46 +03:00
Add new action to generate themes
This commit is contained in:
parent
0e15f9930a
commit
f8c76aeba7
56
.github/workflows/actions.yml
vendored
56
.github/workflows/actions.yml
vendored
@ -1,18 +1,52 @@
|
|||||||
name: Generate themes.json
|
name: Execute Python Scripts on New Theme-YML Files
|
||||||
on: [workflow_dispatch]
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'theme-yml/*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
build:
|
||||||
name: Lint with ESLint
|
runs-on: ubuntu-20.04
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- run: |
|
- name: Checkout code
|
||||||
bash tools/generate.sh
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Update ubuntu
|
||||||
|
run: |
|
||||||
|
apt -qq update
|
||||||
|
echo 🏅
|
||||||
|
|
||||||
|
- name: Install python3
|
||||||
|
run: |
|
||||||
|
apt install python3 -y > /dev/null 2>&1
|
||||||
|
echo 🏅
|
||||||
|
|
||||||
|
- name: Install pip3
|
||||||
|
run: |
|
||||||
|
apt install -y python3-pip > /dev/null 2>&1
|
||||||
|
echo 🏅
|
||||||
|
|
||||||
|
- name: Python3 requirements.txt
|
||||||
|
run: |
|
||||||
|
pip3 install -r requirements.txt > /dev/null 2>&1
|
||||||
|
echo 🏅
|
||||||
|
|
||||||
|
- name: Generate json
|
||||||
|
run: |
|
||||||
|
python3 tools/generatJson.py
|
||||||
|
echo 🏅
|
||||||
|
|
||||||
|
- name: Generate Installers
|
||||||
|
run: |
|
||||||
|
python3 tools/generateShFiles.py
|
||||||
|
echo 🏅
|
||||||
|
|
||||||
|
- name: Git commit
|
||||||
|
run: |
|
||||||
git config user.name github-actions[bot]
|
git config user.name github-actions[bot]
|
||||||
git config user.email github-actions[bot]@github.com
|
git config user.email github-actions[bot]@github.com
|
||||||
git add .
|
git add .
|
||||||
git commit -m "------- Generate themes.json -------"
|
git commit -m "------- Generate Themes Github Action -------"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
ruamel.yaml==0.17.21
|
ruamel.yaml==0.17.21
|
||||||
|
unidecode
|
||||||
|
pyyaml
|
||||||
|
@ -3,8 +3,8 @@ import json
|
|||||||
import yaml
|
import yaml
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
source_path = "../themes-yml"
|
source_path = "./themes-yml"
|
||||||
dest_path = "../data/themes.json"
|
dest_path = "./data/themes.json"
|
||||||
themes = []
|
themes = []
|
||||||
|
|
||||||
os.remove(dest_path)
|
os.remove(dest_path)
|
||||||
|
@ -5,8 +5,8 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
folder_path = "../themes-yml"
|
folder_path = "./themes-yml"
|
||||||
dest_path = '../themes'
|
dest_path = './themes'
|
||||||
themes = []
|
themes = []
|
||||||
|
|
||||||
# List files and directories in the folder
|
# List files and directories in the folder
|
||||||
|
Loading…
Reference in New Issue
Block a user