diff --git a/.github/workflows/test_build_deb.yml b/.github/workflows/test_build_deb.yml new file mode 100644 index 0000000..ca1eec4 --- /dev/null +++ b/.github/workflows/test_build_deb.yml @@ -0,0 +1,58 @@ + +name: Test creation of deb package after code changes + +on: + push: + branches: + - develop + - 'release-v**' + pull_request: + branches: + - develop + - 'release-v**' + workflow_dispatch: + + workflow_call: + outputs: + deb-file-name: + description: "DEB file name" + value: ${{ jobs.build_deb.outputs.deb-file-name }} + +jobs: + build_deb: + name: Build DEB file + runs-on: ubuntu-latest + outputs: + deb-file-name: ${{ steps.get-deb-filename.outputs.deb-file-name }} + steps: + - uses: actions/checkout@v3 + with: + repository: learningequality/kolibri-installer-debian + - uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('setup.py', 'build_requires.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: 3.10.11 + - name: Download artifact from kolibri repository + uses: dawidd6/action-download-artifact@v2 + with: + workflow: pr_build_kolibri.yml + branch: master + repo: learningequality/kolibri/ + path: build_src + - name: Install Debian build package dependencies + run: sudo apt install -y devscripts debhelper dh-python python3-all python3-pytest po-debconf python3-setuptools + - name: Run the build + run: make kolibri.deb + - name: Get DEB filename + id: get-deb-filename + run: echo "::set-output name=deb-file-name::$(ls dist | grep all.deb | cat)" + - uses: actions/upload-artifact@v2 + with: + name: ${{ steps.get-deb-filename.outputs.deb-file-name }} + path: dist/${{ steps.get-deb-filename.outputs.deb-file-name }}