From 9f4c9dbe854d2386075d771e27f7d67734d8b527 Mon Sep 17 00:00:00 2001 From: Tjerk Nan Date: Tue, 15 Oct 2024 15:03:39 +0200 Subject: [PATCH] update --- .github/workflows/build_venv.yaml | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_venv.yaml b/.github/workflows/build_venv.yaml index 23e0146..6af3231 100644 --- a/.github/workflows/build_venv.yaml +++ b/.github/workflows/build_venv.yaml @@ -6,28 +6,18 @@ on: - v* jobs: build: + strategy: + matrix: + python_version: ['3.11'] runs-on: ubuntu-22.04 steps: - name: Install required libraries run: sudo apt install -y libsystemd-dev - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Checkout code - uses: actions/checkout@v4 - - name: prep - run: sudo mkdir -p /usr/local/rdo-microsoft365-exporter/current/ - - name: prep chown - run: sudo chown `id -u`:`id -g` /usr/local/rdo-microsoft365-exporter/current/ - - name: copy project to run location. - run: cp -r ./requirements.txt /usr/local/rdo-microsoft365-exporter/current/ - - name: Create env - run: python3 -m venv /usr/local/rdo-microsoft365-exporter/current/.venv - - name: pip3 install - run: cd /usr/local/rdo-microsoft365-exporter/current; source .venv/bin/activate; pip install -U pip; pip install -r requirements.txt - - name: Create archive - run: cd /usr/local/rdo-microsoft365-exporter/current/; tar -czf $GITHUB_WORKSPACE/rdo-microsoft365-exporter_venv_${{ env.RELEASE_VERSION }}.tar.gz .venv - - name: Upload venv tar - uses: actions/upload-artifact@v4 + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV && + echo "PKG_NAME=`basename $GITHUB_REPOSITORY -private`" >> $GITHUB_ENV + - name: Build venv package + uses: minvws/nl-irealisatie-generic-pipelines/.github/actions/python-venv-package@main with: - name: rdo-microsoft365-exporter_venv_${{ env.RELEASE_VERSION }} - path: rdo-microsoft365-exporter_venv_${{ env.RELEASE_VERSION }}.tar.gz + python_version: ${{ matrix.python_version }} + package_file_name: ${{ env.PKG_NAME }} \ No newline at end of file