mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-06 05:13:49 +00:00
.github: Rework for merge approval
This commit is contained in:
37
.github/workflows/PRMerged.yml
vendored
37
.github/workflows/PRMerged.yml
vendored
@@ -30,40 +30,3 @@ jobs:
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
IdentifyBranches:
|
||||
if: github.event.pull_request.merged == true || inputs.pr_number
|
||||
outputs:
|
||||
branches: ${{ steps.getbranches.outputs.branches }}
|
||||
branch_count: ${{ steps.getbranches.outputs.branch_count }}
|
||||
github_token: ${{steps.get_workflow_token.outputs.token}}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get cherry-pick branches
|
||||
uses: asterisk/asterisk-ci-actions/GetCherryPickBranchesFromPR@main
|
||||
id: getbranches
|
||||
with:
|
||||
repo: ${{env.REPO}}
|
||||
pr_number: ${{env.PR_NUMBER}}
|
||||
cherry_pick_regex: ${{vars.CHERRY_PICK_REGEX}}
|
||||
github_token: ${{env.GITHUB_TOKEN}}
|
||||
|
||||
MergeCherryPicks:
|
||||
needs: [ IdentifyBranches ]
|
||||
if: needs.IdentifyBranches.outputs.branch_count > 0
|
||||
continue-on-error: false
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
branch: ${{ fromJSON(needs.IdentifyBranches.outputs.branches) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Cherry Pick PR ${{env.PR_NUMBER}} to branch ${{matrix.branch}}
|
||||
uses: asterisk/asterisk-ci-actions/CherryPick@main
|
||||
with:
|
||||
repo: ${{env.REPO}}
|
||||
pr_number: ${{env.PR_NUMBER}}
|
||||
branch: ${{matrix.branch}}
|
||||
github_token: ${{secrets.ASTERISKTEAM_PAT}}
|
||||
access_app_id: ${{secrets.ASTERISK_ORG_ACCESS_APP_ID}}
|
||||
access_app_key: ${{secrets.ASTERISK_ORG_ACCESS_APP_PRIV_KEY}}
|
||||
|
||||
Reference in New Issue
Block a user