Update and Deploy Marketplace #7
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: Update and Deploy Marketplace | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'metadata/**' | |
| - 'config.yml' | |
| schedule: | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-and-deploy: | |
| name: Fetch APKs, build index, deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install fdroidserver | |
| run: pip install fdroidserver | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Restore repo signing keystore | |
| run: echo "$FDROID_KEYSTORE_BASE64" | base64 -d > keystore.p12 | |
| env: | |
| FDROID_KEYSTORE_BASE64: ${{ secrets.FDROID_KEYSTORE_BASE64 }} | |
| - name: Check for updates from app repos | |
| run: fdroid checkupdates --verbose || true | |
| - name: Fetch and update repo | |
| run: fdroid update --create-metadata --verbose | |
| env: | |
| FDROID_KEY_STORE_PASS: ${{ secrets.FDROID_KEY_STORE_PASS }} | |
| FDROID_KEY_PASS: ${{ secrets.FDROID_KEY_PASS }} | |
| - name: Verify repo index | |
| run: | | |
| test -f repo/index-v2.json || { echo "index not generated"; exit 1; } | |
| python3 -c " | |
| import json | |
| data = json.load(open('repo/index-v2.json')) | |
| count = len(data.get('packages', {})) | |
| print(f'Apps in marketplace: {count}') | |
| " | |
| - name: Deploy to Vercel | |
| uses: amondnet/vercel-action@v25 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
| vercel-args: '--prod' |