File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "default_recipient" : " Jenkins_pega" ,
3+ "days_before_branch_delete" : 7 ,
4+ "exempt_branches_regex" : " "
5+ }
Original file line number Diff line number Diff line change 1+ name : Branch Cleaner
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ token :
7+ description : ' GitHub authentication token (PAT or GitHub App token) with required permissions for API access.'
8+ required : true
9+ type : string
10+
11+ permissions :
12+ contents : write
13+ pull-requests : write
14+ actions : write
15+
16+ jobs :
17+ custom-input-configuration :
18+ runs-on : ${{ vars.GOVERNANCE_RUNNER }}
19+ outputs :
20+ default_recipient : ${{ steps.input_config.outputs.default_recipient}}
21+ days_before_branch_delete : ${{ steps.input_config.outputs.days_before_branch_delete}}
22+ exempt_branches_regex : ${{ steps.input_config.outputs.exempt_branches_regex}}
23+ steps :
24+ - name : Checkout repository
25+ uses : Pega-ProductEngineering/sdea-ci-standards/actions/checkout@v1
26+
27+ - name : input-configuration
28+ id : input_config
29+ run : |
30+ default_recipient=$(jq -r '.default_recipient' .github/config/branch-cleaner-config.json)
31+ days_before_branch_delete=$(jq -r '.days_before_branch_delete // empty' .github/config/branch-cleaner-config.json)
32+ exempt_branches_regex=$(jq -r '.exempt_branches_regex // empty' .github/config/branch-cleaner-config.json)
33+ echo "default_recipient=$default_recipient" >> $GITHUB_OUTPUT
34+ echo "days_before_branch_delete=$days_before_branch_delete" >> $GITHUB_OUTPUT
35+ echo "exempt_branches_regex=$exempt_branches_regex" >> $GITHUB_OUTPUT
36+
37+ branch-cleanup :
38+ needs : custom-input-configuration
39+ uses : Pega-ProductEngineering/branch-cleanup/.github/workflows/master-branch-cleanup.yml@v2.0.0
40+ with :
41+ default-recipient : ${{ needs.custom-input-configuration.outputs.default_recipient}}
42+ days-before-branch-delete : ${{ needs.custom-input-configuration.outputs.days_before_branch_delete }}
43+ exempt-branches-regex : ${{ needs.custom-input-configuration.outputs.exempt_branches_regex }}
44+ token : ${{ inputs.token }}
45+ runner : ${{ vars.GOVERNANCE_RUNNER }}
You can’t perform that action at this time.
0 commit comments