Skip to content

Commit a4a3156

Browse files
authored
[CI] Dockerize pre-commit jobs (learning-process#580)
1 parent 98e620b commit a4a3156

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/pre-commit.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,22 @@ on:
88
jobs:
99
pre-commit:
1010
runs-on: ubuntu-24.04
11+
container:
12+
image: ghcr.io/learning-process/ppc-ubuntu:latest
13+
credentials:
14+
username: ${{ github.actor }}
15+
password: ${{ secrets.GITHUB_TOKEN }}
1116
steps:
1217
- uses: actions/checkout@v4
1318
with:
1419
submodules: recursive
1520
fetch-depth: 0
1621
- name: Setup environment
1722
run: |
18-
sudo apt-get update
19-
sudo apt-get install --no-install-recommends -y \
20-
gcc-14 g++-14 ninja-build python3-pip
21-
wget https://apt.llvm.org/llvm.sh
22-
chmod u+x llvm.sh
23-
sudo ./llvm.sh 20 all
24-
python3 -m pip install -r requirements.txt
23+
python3 -m pip install -r requirements.txt --break-system-packages --ignore-installed
24+
- name: Configure git safe directory
25+
run: |
26+
git config --global --add safe.directory '*'
2527
- name: Run pre-commit checks
2628
run: |
2729
FROM_REF="${{ github.base_ref || 'HEAD~1' }}"

0 commit comments

Comments
 (0)