.github: Rework for merge approval

This commit is contained in:
George Joseph
2023-06-06 06:08:34 -06:00
parent fe15631d38
commit b3c2a9cd44
4 changed files with 206 additions and 63 deletions

View File

@@ -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}}