Update README.md #782
Workflow file for this run
This file contains hidden or 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: AION Structure Scanner | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| scan-structure: | |
| name: 📁 Scan Repository Structure | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| persist-credentials: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Count files (simple bash) | |
| run: | | |
| echo "📁 Scanning repository..." | |
| # Create output directory | |
| mkdir -p .aions-structure-list | |
| # Count files with find command | |
| TOTAL_FILES=$(find . -type f -not -path "./.*" -not -path "*/__pycache__/*" -not -path "*/node_modules/*" -not -path "*/venv/*" -not -path "./.aions-structure-list/*" | wc -l) | |
| TOTAL_DIRS=$(find . -type d -not -path "./.*" -not -path "*/__pycache__/*" -not -path "*/node_modules/*" -not -path "*/venv/*" -not -path "./.aions-structure-list/*" | wc -l) | |
| PY_FILES=$(find . -name "*.py" -not -path "./.*" -not -path "*/__pycache__/*" -not -path "*/node_modules/*" -not -path "*/venv/*" -not -path "./.aions-structure-list/*" | wc -l) | |
| MD_FILES=$(find . -name "*.md" -not -path "./.*" -not -path "./.aions-structure-list/*" | wc -l) | |
| YAML_FILES=$(find . -name "*.yml" -o -name "*.yaml" -not -path "./.*" -not -path "./.aions-structure-list/*" | wc -l) | |
| # Create stats.json | |
| cat > .aions-structure-list/stats.json << EOF | |
| { | |
| "total_files": $TOTAL_FILES, | |
| "total_directories": $TOTAL_DIRS, | |
| "python_files": $PY_FILES, | |
| "markdown_files": $MD_FILES, | |
| "yaml_files": $YAML_FILES, | |
| "scan_time": "$(date -Iseconds)" | |
| } | |
| EOF | |
| # Create structure file | |
| cat > .aions-structure-list/STRUCTURE.MD << EOF | |
| # 📊 AION-BRAIN Repository Stats | |
| **Last Scan:** $(date) | |
| - **Total Files:** $TOTAL_FILES | |
| - **Total Directories:** $TOTAL_DIRS | |
| - **Python Files:** $PY_FILES | |
| - **Markdown Files:** $MD_FILES | |
| - **YAML Files:** $YAML_FILES | |
| ## Recent Files | |
| \`\`\` | |
| $(find . -type f -not -path "./.*" -not -path "*/__pycache__/*" -not -path "*/node_modules/*" -not -path "*/venv/*" -not -path "./.aions-structure-list/*" | head -20 | sort) | |
| \`\`\` | |
| EOF | |
| echo "✅ Scan complete!" | |
| echo "📁 Directories: $TOTAL_DIRS" | |
| echo "📄 Files: $TOTAL_FILES" | |
| echo "🐍 Python: $PY_FILES" | |
| echo "📚 Markdown: $MD_FILES" | |
| echo "⚙️ YAML: $YAML_FILES" | |
| - name: Create badge snippet | |
| run: | | |
| if [ -f ".aions-structure-list/stats.json" ]; then | |
| TOTAL_FILES=$(grep -o '"total_files": [0-9]*' .aions-structure-list/stats.json | grep -o '[0-9]*') | |
| TOTAL_DIRS=$(grep -o '"total_directories": [0-9]*' .aions-structure-list/stats.json | grep -o '[0-9]*') | |
| PY_FILES=$(grep -o '"python_files": [0-9]*' .aions-structure-list/stats.json | grep -o '[0-9]*') | |
| cat > .aions-structure-list/BADGE-SNIPPET.md << EOF | |
| ## 📊 Repository Stats | |
|  | |
|  | |
|  | |
| *Updated automatically* | |
| EOF | |
| echo "Badge snippet created!" | |
| cat .aions-structure-list/BADGE-SNIPPET.md | |
| else | |
| echo "No stats file found" | |
| fi | |
| - name: Commit and push updates | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add .aions-structure-list/ | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "🤖 Auto-update: Repository structure scan [skip ci]" | |
| git push | |
| echo "✅ Changes pushed!" | |
| fi | |
| - name: Upload results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: structure-scan-results | |
| path: .aions-structure-list/ |