From 9a6eab34b16f2ae6f75dc1d86388180b1ea1b0b6 Mon Sep 17 00:00:00 2001 From: Martin Malina Date: Wed, 16 Oct 2024 14:24:51 +0200 Subject: [PATCH] fix: gitlint installation 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 --- .github/workflows/lint.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6e98a4d7e..bf7235c9f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -32,7 +32,7 @@ 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 @@ -40,9 +40,14 @@ jobs: 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: