ci.yml
1 name: CI 2 3 concurrency: 4 group: ci-${{ github.ref }} 5 cancel-in-progress: true 6 7 on: 8 push: 9 branches: [main] 10 pull_request: 11 branches: [main] 12 workflow_dispatch: 13 14 jobs: 15 test: 16 name: Test 17 runs-on: native 18 steps: 19 - name: Checkout 20 uses: actions/checkout@v4 21 22 - name: Check Python Version 23 run: python3 --version 24 25 - name: Verify Scripts 26 run: | 27 python3 -m py_compile config.py 28 python3 -m py_compile bootstrap.py 29 python3 -m py_compile map_arch_to_repo.py 30 python3 -m py_compile run.py 31 32 - name: Test Proxy Help 33 run: python3 run.py --help || python3 run.py echo "proxy works" 34 35 radicle-push: 36 name: Radicle Sync 37 runs-on: native 38 needs: test 39 if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') 40 steps: 41 - name: Checkout from Forgejo 42 uses: actions/checkout@v4 43 with: 44 fetch-depth: 0 45 path: forgejo-src 46 47 - name: Sync to Radicle 48 run: | 49 export PATH=$HOME/.radicle/bin:$PATH 50 RID="rad:z2sXxPZ9eiDGcauDDMzh62yuoRJQF" 51 52 rad clone "$RID" radicle-repo || true 53 cd radicle-repo 54 55 git remote add forgejo ../forgejo-src || git remote set-url forgejo ../forgejo-src 56 git fetch forgejo main 57 58 git checkout main 59 git merge --ff-only forgejo/main || git reset --hard forgejo/main 60 61 git push rad main