TEMP add PAT_ACTIONS read-only probe workflow (SK-2986, to be deleted) #1
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: TEMP PAT_ACTIONS probe (delete me) | |
| on: | |
| push: | |
| branches: [ "ci-test/pat-probe" ] | |
| workflow_dispatch: | |
| jobs: | |
| probe: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Inspect PAT_ACTIONS identity, scopes, and repo permissions | |
| env: | |
| PAT: ${{ secrets.PAT_ACTIONS }} | |
| run: | | |
| echo "== token scopes (classic PAT only; blank for fine-grained) ==" | |
| curl -sI -H "Authorization: token $PAT" https://api.github.com/user \ | |
| | grep -iE "x-oauth-scopes:" || echo "(no X-OAuth-Scopes header -> likely fine-grained PAT)" | |
| echo | |
| echo "== authenticated identity ==" | |
| curl -s -H "Authorization: token $PAT" https://api.github.com/user \ | |
| | python3 -c "import sys,json;d=json.load(sys.stdin);print('login:',d.get('login'),'| type:',d.get('type'))" | |
| echo | |
| echo "== this token's permissions on skyflow-java ==" | |
| curl -s -H "Authorization: token $PAT" https://api.github.com/repos/skyflowapi/skyflow-java \ | |
| | python3 -c "import sys,json;d=json.load(sys.stdin);p=d.get('permissions',{});print('permissions:',p);print('=> can write (push):',p.get('push'));print('=> is bypass actor (admin):',p.get('admin'))" |