Skip to content

Commit 9f4c9db

Browse files
committed
update
1 parent c05dac2 commit 9f4c9db

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

.github/workflows/build_venv.yaml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,18 @@ on:
66
- v*
77
jobs:
88
build:
9+
strategy:
10+
matrix:
11+
python_version: ['3.11']
912
runs-on: ubuntu-22.04
1013
steps:
1114
- name: Install required libraries
1215
run: sudo apt install -y libsystemd-dev
1316
- name: Set env
14-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
15-
- name: Checkout code
16-
uses: actions/checkout@v4
17-
- name: prep
18-
run: sudo mkdir -p /usr/local/rdo-microsoft365-exporter/current/
19-
- name: prep chown
20-
run: sudo chown `id -u`:`id -g` /usr/local/rdo-microsoft365-exporter/current/
21-
- name: copy project to run location.
22-
run: cp -r ./requirements.txt /usr/local/rdo-microsoft365-exporter/current/
23-
- name: Create env
24-
run: python3 -m venv /usr/local/rdo-microsoft365-exporter/current/.venv
25-
- name: pip3 install
26-
run: cd /usr/local/rdo-microsoft365-exporter/current; source .venv/bin/activate; pip install -U pip; pip install -r requirements.txt
27-
- name: Create archive
28-
run: cd /usr/local/rdo-microsoft365-exporter/current/; tar -czf $GITHUB_WORKSPACE/rdo-microsoft365-exporter_venv_${{ env.RELEASE_VERSION }}.tar.gz .venv
29-
- name: Upload venv tar
30-
uses: actions/upload-artifact@v4
17+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV &&
18+
echo "PKG_NAME=`basename $GITHUB_REPOSITORY -private`" >> $GITHUB_ENV
19+
- name: Build venv package
20+
uses: minvws/nl-irealisatie-generic-pipelines/.github/actions/python-venv-package@main
3121
with:
32-
name: rdo-microsoft365-exporter_venv_${{ env.RELEASE_VERSION }}
33-
path: rdo-microsoft365-exporter_venv_${{ env.RELEASE_VERSION }}.tar.gz
22+
python_version: ${{ matrix.python_version }}
23+
package_file_name: ${{ env.PKG_NAME }}

0 commit comments

Comments
 (0)