File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,21 +5,28 @@ name: Python package
55
66on :
77 push :
8- branches : ['main ']
8+ branches : ['** ']
99 pull_request :
1010 branches : ['main']
1111
1212permissions :
1313 contents : read
1414
1515jobs :
16- ruff :
16+ lint :
1717 runs-on : ubuntu-latest
1818
1919 steps :
2020 - uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
2121 with :
22- ref : ${{ github.event.pull_request.head.sha || github.sha }}
22+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
23+ - name : Debug checkout ref
24+ run : |
25+ echo "event_name=${{ github.event_name }}"
26+ echo "github_ref=${{ github.ref }}"
27+ echo "github_sha=${{ github.sha }}"
28+ echo "pr_head_sha=${{ github.event.pull_request.head.sha }}"
29+ git rev-parse HEAD
2330 - name : Set up Python 3.14
2431 uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
2532 with :
3441 run : ruff format --check .
3542
3643 build :
37- needs : ruff
44+ needs : lint
3845 runs-on : ${{ matrix.os }}
3946 strategy :
4047 fail-fast : false
4552 steps :
4653 - uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
4754 with :
48- ref : ${{ github.event.pull_request.head.sha || github.sha }}
55+ ref : ${{ github.event_name == 'pull_request' && github. event.pull_request.head.sha || github.sha }}
4956 - name : Set up Python ${{ matrix.python-version }}
5057 uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
5158 with :
You can’t perform that action at this time.
0 commit comments