Skip to content

Commit 0b7aad4

Browse files
authored
Add workflow to trigger a build of the package repo (#251)
This workflow is an adapted copy of this workflow : https://github.com/qualcomm-linux/pkg-template/blob/main/.github/workflows/to_paste_in_upstream/pkg-build-pr-check.yml With this workflow in position, a PR in the upstream project repo (this one) triggers a build or the sister package repo (in this case, it will be https://github.com/qualcomm-linux/pkg-fastrpc). The special repo variable PKG_REPO_GITHUB_NAME will need to be set to "qualcomm-linux/pkg-fastrpc" in this repo for this to work. See visit https://github.com/qualcomm-linux/pkg-template for more info about this whole CI workflow. When a PR is open in this repo, this workflow will in turn call this one : https://github.com/qualcomm-linux/qcom-build-utils/blob/main/.github/workflows/qcom-upstream-pr-pkg-build-reusable-workflow.yml What it will do is try to compile the debian package from the "qualcomm-linux/pkg-fastrpc" but with the changes from the PR opened on this side added in order to test that the debian package will still build if this PR were to be merged. Ultimately, there will be even more tests downstream from that, like integration tests in a whole distro.
2 parents 2d08520 + e9df1a2 commit 0b7aad4

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
name: Package Build PR Check
3+
description: |
4+
This workflow will execute when a PR is open against the configured branch.
5+
On top of whatever kind of CI/CD logic happens in this upstream repo, this
6+
workflow will make sure that what is attempted to be merged in the main release
7+
branch won't break the debian package. The variable PKG_REPO_GITHUB_NAME needs to
8+
be set in the repo where this file reside. This variable hold the packaging repo
9+
name on github associated to this upstream repo. What will happen is that the PR
10+
triggering this workflow will go knock on the packaging repo's door and trigger
11+
a full build of the package if it were to include these changes.
12+
13+
on:
14+
pull_request_target:
15+
branches: [ main, development ]
16+
types:
17+
- ready_for_review
18+
- synchronize
19+
paths-ignore:
20+
- '.github/**'
21+
22+
permissions:
23+
contents: read
24+
25+
concurrency:
26+
group: pr-${{ github.event.pull_request.number }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
package-build-pr-check:
31+
uses: qualcomm-linux/qcom-build-utils/.github/workflows/qcom-upstream-pr-pkg-build-reusable-workflow.yml@main
32+
with:
33+
qcom-build-utils-ref: main
34+
upstream-repo: ${{github.repository}}
35+
upstream-repo-ref: ${{github.head_ref}}
36+
pkg-repo: ${{vars.PKG_REPO_GITHUB_NAME}}
37+
pr-number: ${{github.event.pull_request.number}}
38+
secrets:
39+
TOKEN: ${{ secrets.DEB_PKG_BOT_CI_TOKEN }}

0 commit comments

Comments
 (0)