Skip to content

Commit

Permalink
copy workflow to master to allow its execution in GH
Browse files Browse the repository at this point in the history
  • Loading branch information
José Redrejo committed Apr 14, 2023
1 parent fdb96a1 commit af8f197
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/test_build_deb.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit af8f197

Please sign in to comment.