-
Notifications
You must be signed in to change notification settings - Fork 554
98 lines (84 loc) · 2.77 KB
/
update_icons_and_resources.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: "Update Icons and Resources ✨"
on:
push:
branches:
- main
- dev
paths:
- "svg/**"
workflow_dispatch:
jobs:
convert_assets:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Set Up Python 🐍
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install Dependencies 📦
run: |
pip install cairosvg pillow
- name: Run SVG to PNG and WEBP Conversion ♻️
run: python scripts/convert_svg_assets.py
- name: Commit and Push Changes 📤
run: |
git config --global user.email "[email protected]"
git config --global user.name "Dashboard Icons Bot"
git add png/ webp/
git commit -m ":recycle: Convert SVG assets to PNG and WEBP" || exit 0
git pull --rebase origin ${{ github.ref_name }}
git push origin HEAD:${{ github.ref_name }}
generate_file_tree:
needs: convert_assets
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Set Up Python 🐍
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Generate File Tree 🌳
run: python scripts/generate_file_tree.py svg png webp
- name: Commit and Push Changes 📤
run: |
git config --global user.email "[email protected]"
git config --global user.name "Dashboard Icons Bot"
git add tree.json
git commit -m ":construction_worker: Generate file tree" || exit 0
git pull --rebase origin ${{ github.ref_name }}
git push origin HEAD:${{ github.ref_name }}
generate_icons_page:
needs: generate_file_tree
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Set Up Python 🐍
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Generate ICONS.md 🚀
run: python scripts/generate_icons_page.py
- name: Commit and Push Changes 📤
run: |
git config --global user.email "[email protected]"
git config --global user.name "Dashboard Icons Bot"
git add ICONS.md
git commit -m ":construction_worker: Generate ICONS.md" || exit 0
git pull --rebase origin ${{ github.ref_name }}
git push origin HEAD:${{ github.ref_name }}