Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/pkg-build-pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

name: Package Build PR Check
description: |
This workflow will execute when a PR is open against the configured branch.
On top of whatever kind of CI/CD logic happens in this upstream repo, this
workflow will make sure that what is attempted to be merged in the main release
branch won't break the debian package. The variable PKG_REPO_GITHUB_NAME needs to
be set in the repo where this file reside. This variable hold the packaging repo
name on github associated to this upstream repo. What will happen is that the PR
triggering this workflow will go knock on the packaging repo's door and trigger
a full build of the package if it were to include these changes.

on:
pull_request_target:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be pull_request instead of pull_request_target? Or is it intended to run the workflow against the base repo instead of the PR's repo? I'm assuming this workflow is intended for all the PRs that are getting raised for this project.

branches: [ main, development ]

permissions:
contents: read
security-events: write
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why security-events need to have write permissions? Is there any code scanning happening with this workflow?


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is concurrency check also needed here? Say if multiple PR updates happen quickly?

jobs:
package-build-pr-check:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding timeout-minutes here might help to avoid stuck runners

uses: qualcomm-linux/qcom-build-utils/.github/workflows/qcom-upstream-pr-pkg-build-reusable-workflow.yml@main
with:
qcom-build-utils-ref: main
upstream-repo: ${{github.repository}}
upstream-repo-ref: ${{github.head_ref}}
pkg-repo: ${{vars.PKG_REPO_GITHUB_NAME}}
pr-number: ${{github.event.pull_request.number}}
secrets:
TOKEN: ${{ secrets.DEB_PKG_BOT_CI_TOKEN }}
Loading