Skip to content

Commit

Permalink
fix: gitlint installation (#616)
Browse files Browse the repository at this point in the history
Latest ubuntu does not allow system wide pip install.
It can be overriden with `--break-system-packages`,
but it's better to create a virtual env.

Note: This came up in another repo where we use ubuntu-latest.
Here were using an older version of ubuntu, but we it's probably
best we switch to ubuntu-latest as well.

Signed-off-by: Martin Malina <[email protected]>
  • Loading branch information
mmalina authored Oct 16, 2024
1 parent 733ca3d commit c19c745
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@ jobs:
GITHUB_REFNAME: ${{ github.ref_name }}
gitlint:
name: Run gitlint checks
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Install gitlint into container
run: python -m pip install gitlint
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip install gitlint
- name: Run gitlint check
run: gitlint --commits origin/${{ github.event.pull_request.base.ref }}..HEAD
run: |
source venv/bin/activate
gitlint --commits origin/${{ github.event.pull_request.base.ref }}..HEAD
checkton:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit c19c745

Please sign in to comment.