-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy workflow to master to allow its execution in GH
- Loading branch information
José Redrejo
committed
Apr 14, 2023
1 parent
fdb96a1
commit af8f197
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |