File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,14 @@ jobs:
3636 submodules : true
3737 - name : Build wheels
3838 uses : PyO3/maturin-action@v1
39+ env :
40+ READ_ONLY_GITHUB_TOKEN : ${{ secrets.PUBLIC_REPO_TOKEN }}
3941 with :
4042 target : ${{ matrix.platform.target }}
4143 args : --release --out dist --interpreter python3.11 python3.12 python3.13 python3.14 python3.13t python3.14t --auditwheel skip
4244 working-directory : crackers_python
4345 manylinux : manylinux2_28
46+ docker-options : " --env READ_ONLY_GITHUB_TOKEN"
4447 before-script-linux : |
4548 curl -LsSf https://astral.sh/uv/install.sh | sh
4649 uv venv
Original file line number Diff line number Diff line change @@ -63,7 +63,15 @@ def install_z3_glibc(target_platform):
6363
6464 # GitHub API to fetch the latest release
6565 api_url = "https://api.github.com/repos/Z3Prover/z3/releases/latest"
66- with urllib .request .urlopen (api_url ) as response :
66+
67+ # Check for GitHub PAT to avoid rate limiting
68+ request = urllib .request .Request (api_url )
69+ github_token = os .environ .get ("READ_ONLY_GITHUB_TOKEN" )
70+ if github_token :
71+ request .add_header ("Authorization" , f"Bearer { github_token } " )
72+ print ("Using GitHub PAT from READ_ONLY_GITHUB_TOKEN for API authentication." , file = sys .stderr )
73+
74+ with urllib .request .urlopen (request ) as response :
6775 data = json .loads (response .read ().decode ())
6876
6977 assets = data .get ("assets" , [])
You can’t perform that action at this time.
0 commit comments