From a043c293a456de35ef1e1e9a900fd7fb1722c4a4 Mon Sep 17 00:00:00 2001 From: Joe Haines Date: Mon, 20 May 2024 09:47:04 +0100 Subject: [PATCH] Install Python 3.10 for license finder --- .github/workflows/license-audit.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/license-audit.yml b/.github/workflows/license-audit.yml index c5f287d..b0224da 100644 --- a/.github/workflows/license-audit.yml +++ b/.github/workflows/license-audit.yml @@ -4,18 +4,16 @@ on: [push, pull_request] jobs: license-audit: - # TODO: a GH action update broke the 'ubuntu-latest' image - # when it's fixed, we should switch back - runs-on: ubuntu-20.04 + runs-on: 'ubuntu-latest' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v2 with: - # License Finder's Docker image uses Python 3.5 - python-version: 3.5 + # License Finder's Docker image uses Python 3.10 + python-version: '3.10' - name: Fetch decisions.yml run: curl https://raw.githubusercontent.com/bugsnag/license-audit/master/config/decision_files/global.yml -o decisions.yml @@ -32,6 +30,9 @@ jobs: run: > docker run -v $PWD:/scan licensefinder/license_finder /bin/bash -lc " cd /scan && - pip3 install -r requirements.txt --quiet && + apt install python3.10-venv && + python3 -m venv .venv && + source .venv/bin/activate && + pip3 install -r requirements.txt && license_finder --decisions-file decisions.yml --python-version 3 --enabled-package-managers=pip "