This repository was archived by the owner on Jul 30, 2025. It is now read-only.
Compile Repository #9
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: Compile Repository | |
| on: | |
| schedule: | |
| - cron: '10 23 * * *' # 23:10 GMT = 00:10 BST | |
| workflow_dispatch: | |
| inputs: | |
| altstore: | |
| description: 'Compile AltStore format' | |
| required: false | |
| type: boolean | |
| default: true | |
| trollapps: | |
| description: 'Compile TrollApps format' | |
| required: false | |
| type: boolean | |
| default: true | |
| scarlet: | |
| description: 'Compile Scarlet format' | |
| required: false | |
| type: boolean | |
| default: true | |
| jobs: | |
| compile-repo: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Check Out Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Debug Directory Contents | |
| run: | | |
| echo "Current directory contents:" | |
| ls -la . | |
| echo "Apps directory contents:" | |
| ls -la Apps/ || echo "Apps directory missing or empty" | |
| echo "repo-info.json contents:" | |
| cat repo-info.json || echo "repo-info.json missing or unreadable" | |
| - name: Ensure Script is Executable | |
| run: chmod +x scripts/compile_repository.py | |
| - name: Compile Repository Files | |
| run: | | |
| ARGS="" | |
| if [ "${{ inputs.altstore }}" = "true" ]; then ARGS="$ARGS -f altstore"; fi | |
| if [ "${{ inputs.trollapps }}" = "true" ]; then ARGS="$ARGS -f trollapps"; fi | |
| if [ "${{ inputs.scarlet }}" = "true" ]; then ARGS="$ARGS -f scarlet"; fi | |
| # If no formats selected, compile all | |
| if [ -z "$ARGS" ]; then | |
| ARGS="-f altstore -f trollapps -f scarlet" | |
| fi | |
| echo "Running: python3 scripts/compile_repository.py $ARGS" | |
| python3 scripts/compile_repository.py $ARGS || exit 1 | |
| - name: Commit and Push Changes | |
| if: success() | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "actions@github.com" | |
| git add *.json || echo "No JSON files to add" | |
| git commit -m "chore: Update repository files" || echo "No changes to commit" | |
| git push || echo "Push failed - likely no changes" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |