Update base-files package info #437
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |