.github: Refactor to use pull_request_target trigger.

After careful review, we believe we can now use the "pull_request_target"
workflow trigger instead of "pull_request" which required a separate
privliged workflow to add labels and comments to PRs when they are submitted
or updated.  This allows us to greatly streamline our workflows and remove
unneeded ones.

* The OnPRChanged workflow was...
  * Renamed to OnPRCheck
  * Changed to trigger on pull_request_target and the "recheckpr" label.
  * Changed to simply call reusable workflows in asterisk-ci-actions.
  * Changed to use better concurrency groups.
* The OnPRCPCheck and OnPRMergeApproved workflows were also...
  * Changed to simply call reusable workflows in asterisk-ci-actions.
  * Changed to use better concurrency groups.
* The NightlyTest and CreateDocs were also tweaked
This commit is contained in:
George Joseph
2025-02-13 13:22:31 -07:00
parent fdbb9e29dd
commit 1f56d5fe7e
9 changed files with 26 additions and 96 deletions

14
.github/workflows/OnPRCheck.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: PRCheck
run-name: "PR ${{ github.event.number }} Check(${{github.event.action}}) by ${{ github.actor }}"
on:
pull_request_target:
types: [ opened, reopened, synchronize, labeled ]
jobs:
PRCheck:
name: "run-check"
if: ${{ (github.event.action != 'labeled') || (github.event.action == 'labeled' && github.event.label.name == vars.RECHECKPR_LABEL) }}
concurrency:
group: check-${{ github.base_ref }}-${{ github.ref_name }}
cancel-in-progress: true
uses: asterisk/asterisk-ci-actions/.github/workflows/AsteriskPRCheck.yml@main-pr-target