Skip to content

Commit fee0f00

Browse files
committed
Move debos build into separate workflow file
Start moving the build logic into separated files to copy the method of meta-qcom to run PR builds/tests with repo secrets. Signed-off-by: Matt Hart <[email protected]>
1 parent 364e942 commit fee0f00

File tree

4 files changed

+48
-11
lines changed

4 files changed

+48
-11
lines changed

.github/workflows/build-daily.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Daily Build
2+
3+
on:
4+
# run daily at 8:30am
5+
schedule:
6+
- cron: '30 8 * * *'
7+
# allow manual runs
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build-daily:
15+
uses: ./.github/workflows/debos.yml

.github/workflows/build-on-pr.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Build on PR
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
build-pr:
11+
uses: ./.github/workflows/debos.yml
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Build on push to branch
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build-daily:
12+
uses: ./.github/workflows/debos.yml

.github/workflows/debos.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
name: Build debos recipe
22

33
on:
4-
# run on pull requests to the main branch
5-
pull_request:
6-
branches: [main]
7-
# run on pushes to the main branch
8-
push:
9-
branches: [main]
10-
# run daily at 8:30am
11-
schedule:
12-
- cron: '30 8 * * *'
13-
# allow manual runs
14-
workflow_dispatch:
4+
workflow_call:
5+
outputs:
6+
artifacts_url:
7+
description: "URL to retrieve build artifacts"
8+
value: ${{ jobs.build-debos.outputs.url }}
159

1610
# only need permission to read repository; implicitely set all other
1711
# permissions to none
@@ -31,6 +25,8 @@ concurrency:
3125

3226
jobs:
3327
build-debos:
28+
outputs:
29+
url: ${{ steps.upload_artifacts.outputs.url }}
3430
runs-on: [self-hosted, arm64, debbuilder]
3531
container:
3632
image: debian:trixie
@@ -98,6 +94,7 @@ jobs:
9894
debos-recipes/qualcomm-linux-debian-flash.yaml
9995
10096
- name: Upload artifacts to fileserver space for builds
97+
id: upload_artifacts
10198
run: |
10299
set -ux
103100
# curl will be used to talk to fileserver; should be installed by
@@ -123,4 +120,5 @@ jobs:
123120
# instruct fileserver to publish this directory
124121
url="${FILESERVER_URL}/${BUILD_ID}/"
125122
curl -X POST -H 'Accept: text/event-stream' "${url}"
123+
echo "url=\"${url}\"" >> $GITHUB_OUTPUT
126124

0 commit comments

Comments
 (0)