-
Notifications
You must be signed in to change notification settings - Fork 54
Add workflow to trigger a build of the package repo #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
|
|
||
| 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: | ||
| branches: [ main, development ] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: pr-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
ekanshibu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| jobs: | ||
| package-build-pr-check: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adding
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, thats not a bad idea, but it seems like its not possible to add it here when using a reusable workflow, it would have to be in a job with the steps: statement, aka inside the reusable workflow |
||
| 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 }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be
pull_requestinstead ofpull_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.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a habit of using 'pull_request_target' for security reason, so running the PR with the workflow from the basebranch, but using the content of the PR branch with the "upstream-repo-ref: ${{github.head_ref}}". What this does is that in the qcom-upstream-pr-pkg-build-reusable-workflow.yml reusable withflow, I checkout the content of the PR