Skip to content

venv broken

venv broken #17

Workflow file for this run

name: Build python virtual env
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-22.04
steps:
- 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-journalert/current/
- name: prep chown
run: sudo chown `id -u`:`id -g` /usr/local/rdo-journalert/current/
- name: copy project to run location.
run: cp -r ./requirements.txt /usr/local/rdo-journalert/current/
- name: Create env
run: python3 -m venv /usr/local/rdo-journalert/current/.venv
- name: pip3 install
run: cd /usr/local/rdo-journalert/current; source .venv/bin/activate; pip install -U pip; pip install -r requirements.txt
- name: Create archive
run: cd /usr/local/rdo-journalert/current/; tar -czf $GITHUB_WORKSPACE/rdo-journalert_venv_${{ env.RELEASE_VERSION }}.tar.gz .venv
- name: Upload venv tar
uses: actions/upload-artifact@v4
with:
name: rdo-journalert_venv_${{ env.RELEASE_VERSION }}
path: rdo-journalert_venv_${{ env.RELEASE_VERSION }}.tar.gz