-
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.35 KB
/
generate-base-files-info-json.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
name: "Update base-files package info"
# Trigger this workflow on a manual dispatch or a scheduled time
on:
workflow_dispatch: # Manually triggered via GitHub Actions UI
schedule:
- cron: '0 * * * *' # Run every hour
jobs:
run-script:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
# Step 3: Install dependencies (if you have any)
- name: Install dependencies
run: |
sudo apt install -y python3-requests python3-lxml
# Step 4: Run the Python script
- name: Run parser script
run: |
./scripts/generate-base-files-info-json.py base-files
# Step 5: Commit changes if any
- name: Commit changes if any
run: |
git checkout data
mkdir -p data/
mv base-files.json data/base-files.json
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add data/base-files.json
git diff --cached --quiet || git commit -m "Update base-files package info"
git push