Skip to content

Commit 05fde36

Browse files
committed
Add GitHub Actions workflow to generate manifest.json
1 parent dc9f37c commit 05fde36

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Generate Manifest
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '.gitattributes'
7+
- '.gitignore'
8+
- 'LICENSE'
9+
- 'README.md'
10+
workflow_dispatch:
11+
release:
12+
types: [published]
13+
14+
jobs:
15+
generate-manifest:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.13'
26+
27+
- name: Generate manifest.json
28+
run: |
29+
python3 << 'EOF'
30+
import os
31+
import sys
32+
33+
from Scripts import integrity_checker
34+
from Scripts import utils
35+
36+
checker = integrity_checker.IntegrityChecker()
37+
38+
root_folder = os.getcwd()
39+
manifest_path = os.path.join(root_folder, "manifest.json")
40+
41+
print(f"Generating manifest from: {root_folder}")
42+
manifest_data = checker.generate_folder_manifest(root_folder, manifest_path)
43+
44+
if manifest_data:
45+
print(f"Manifest generated successfully with {len(manifest_data)} files")
46+
else:
47+
print("Failed to generate manifest")
48+
sys.exit(1)
49+
EOF
50+
51+
- name: Upload manifest.json to Artifacts
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: manifest.json
55+
path: ./manifest.json

0 commit comments

Comments
 (0)