Skip to content

Collect App Information #138

Collect App Information

Collect App Information #138

name: Collect App Information
on:
schedule:
- cron: "0 0 * * *" # Update Apps daily at midnight
workflow_dispatch: # Allow manual triggering
jobs:
collect-app-info:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Make scrapers executable
run: chmod +x .github/scripts/scrapers/*.sh
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Collect app information
run: python .github/scripts/collect_app_info.py
- name: Create supported_apps.json
run: |
python - <<EOF
import json
import os
apps_folder = "Apps"
supported_apps = {}
for filename in os.listdir(apps_folder):
if filename.endswith(".json"):
app_name = os.path.splitext(filename)[0]
supported_apps[app_name] = f"https://raw.githubusercontent.com/ugurkocde/IntuneBrew/main/Apps/{filename}"
with open("supported_apps.json", "w") as f:
json.dump(supported_apps, f, indent=4)
print("Created supported_apps.json")
EOF
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add Apps/*.json supported_apps.json README.md
git commit -m "Update app information and supported apps list" || exit 0
git push https://${{ secrets.PAT }}@github.com/${{ github.repository }}.git