We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b44314 commit 4ae8950Copy full SHA for 4ae8950
1 file changed
.github/workflows/ubuntu.yml
@@ -8,6 +8,7 @@ jobs:
8
- uses: actions/checkout@v4
9
with:
10
submodules: recursive
11
+ fetch-depth: 0
12
- name: Setup environment
13
run: |
14
sudo apt-get update
@@ -16,7 +17,14 @@ jobs:
16
17
python3 -m pip install -r requirements.txt
18
- name: Run pre-commit checks
19
- pre-commit run --from-ref origin/master --to-ref HEAD
20
+ # For push events, compare with previous commit
21
+ if [ "${{ github.event_name }}" = "push" ]; then
22
+ pre-commit run --from-ref HEAD~1 --to-ref HEAD
23
+ else
24
+ # For PRs, compare with base branch
25
+ git fetch origin ${{ github.base_ref }}:${{ github.base_ref }}
26
+ pre-commit run --from-ref ${{ github.base_ref }} --to-ref HEAD
27
+ fi
28
gcc-build:
29
needs:
30
- pre-commit
0 commit comments