Skip to content

Commit 0dad6e1

Browse files
committed
Release
0 parents  commit 0dad6e1

644 files changed

Lines changed: 2695 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
timezone: "Asia/Shanghai"
13+
pull-request-branch-name:
14+
separator: "-"

.github/scripts/generator.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import os
2+
import json
3+
4+
def generate_json():
5+
image_folder = 'Assets'
6+
json_data = {
7+
"name": "Emby icons",
8+
"description": "本订阅图标集按照服名群名拼音名缩写名或者常用叫法来命名,按照字母 A-Z 排序,可自行搜索与查找。",
9+
"icons": []
10+
}
11+
12+
for filename in sorted(os.listdir(image_folder)):
13+
# 按字母顺序来排序遍历
14+
if filename.endswith(".png"):
15+
image_path = os.path.join(image_folder, filename)
16+
raw_url = f"https://raw.githubusercontent.com/{os.environ['GITHUB_REPOSITORY']}/main/{image_path}"
17+
icon_data = {"name": filename, "url": raw_url}
18+
json_data["icons"].append(icon_data)
19+
20+
# Set the output path relative to the repository root
21+
output_path = os.path.join(os.getcwd(), 'Emby.json')
22+
23+
with open(output_path, 'w', encoding='utf-8') as json_file:
24+
json.dump(json_data, json_file, ensure_ascii=False, indent=2)
25+
26+
# Save output data to the GITHUB_STATE environment file
27+
with open(os.environ['GITHUB_STATE'], 'a') as state_file:
28+
state_file.write(f"ICONS_JSON_PATH={output_path}\n")
29+
30+
if __name__ == "__main__":
31+
generate_json()

.github/workflows/Release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
BlankSpace:
8+
runs-on: windows-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
ref: main
13+
14+
- name: commit
15+
run: |
16+
git config --local user.email "action@github.com"
17+
git config --local user.name "GitHub Action"
18+
git checkout --orphan Clearhistory
19+
git branch -D main
20+
git checkout --orphan main
21+
git branch -D Clearhistory
22+
git add .
23+
git commit -m "Release"
24+
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
25+
git push -f -u origin main
26+
- name: Cleanup Workflow
27+
uses: Mattraks/delete-workflow-runs@main
28+
with:
29+
retain_days: 0
30+
keep_minimum_runs: 0

.github/workflows/generator.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: generator
2+
3+
on:
4+
push:
5+
paths:
6+
- 'Assets/**' # 监视 Apps 文件夹及其子文件夹下的内容
7+
pull_request:
8+
paths:
9+
- 'Assets/**' # 监视 Apps 文件夹及其子文件夹下的内容
10+
workflow_dispatch:
11+
12+
jobs:
13+
generate_json:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install requests
29+
30+
- name: Generate JSON
31+
run: |
32+
python .github/scripts/generator.py
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Upload artifact
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: json-artifact
40+
path: ${{ github.workspace }}
41+
42+
- name: Push to Emby-icon Repository
43+
run: |
44+
git config user.name "${{ github.actor }}"
45+
git config user.email "${{ github.actor }}@users.noreply.github.com"
46+
git add .
47+
git commit -m "Release"
48+
git push origin HEAD:main
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Assets/1111.png

50.7 KB

Assets/1111a1.png

49.6 KB

Assets/11Pshare.png

43.1 KB

Assets/11Pshare1.png

42.1 KB

Assets/1231.png

48.4 KB

Assets/1232.png

48.4 KB

0 commit comments

Comments
 (0)