From 056c9499dc4019827ca4a66670d349b11784e357 Mon Sep 17 00:00:00 2001 From: "Juan M. Tirado" Date: Thu, 16 May 2024 11:45:23 +0200 Subject: [PATCH] fix: pass matrix values in env --- .github/actions/install-poetry/action.yml | 2 +- .github/actions/install-python-deps/action.yml | 4 ++-- .github/workflows/python-ci.yml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/actions/install-poetry/action.yml b/.github/actions/install-poetry/action.yml index 79d4abe..87b932a 100644 --- a/.github/actions/install-poetry/action.yml +++ b/.github/actions/install-poetry/action.yml @@ -7,7 +7,7 @@ runs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ PYTHON_VERSION }} - name: Load cached Poetry installation id: cached-poetry diff --git a/.github/actions/install-python-deps/action.yml b/.github/actions/install-python-deps/action.yml index 0853f7b..c9a8691 100644 --- a/.github/actions/install-python-deps/action.yml +++ b/.github/actions/install-python-deps/action.yml @@ -9,8 +9,8 @@ runs: id: cached-poetry-dependencies uses: actions/cache@v4 with: - path: ~/.venv-${{ runner.os }}-${{ matrix.python-version }} - key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} + path: ~/.venv-${{ RUNNER_OS }}-${{ PYTHON_VERSION }} + key: venv-${{ RUNNER_OS }}-${{ PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies shell: bash diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 873d70d..a990d53 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -179,6 +179,9 @@ jobs: token: ${{ secrets.GH_TOKEN || github.token }} - uses: pantos-io/ci-workflows/.github/actions/install-python-deps@v1 + env: + PYTHON_VERSION: '${{ matrix.python-version }}' + RUNNER_OS: '${{ matrix.os }}' - name: UnitTest env: