File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Open PR from csa to main
2+
3+ permissions :
4+ contents : write
5+ pull-requests : write
6+
7+ on :
8+ workflow_run :
9+ workflows : ["Daily Sync of the csa branch"]
10+ types :
11+ - completed
12+ workflow_dispatch :
13+
14+ jobs :
15+ open-pr :
16+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v4
20+ with :
21+ ref : main
22+ token : ${{secrets.WORKFLOW_TOKEN}}
23+
24+ - name : Checkout csa
25+ run : |
26+ git fetch origin csa:csa
27+ git reset --hard csa
28+
29+ - name : Create Pull Request
30+ uses : peter-evans/create-pull-request@v7
31+ with :
32+ branch : automation/update_main
33+ base : main
34+ title : " Sync csa branch with main"
35+ body : |
36+ This PR syncs the csa branch with the main branch.
37+
38+ **PR MUST BE MERGED WITH MERGE COMMIT - ADMIN MUST ENABLE THE OPTION**
39+ token : ${{secrets.GITHUB_TOKEN}}
40+ branch-token : ${{secrets.WORKFLOW_TOKEN}}
41+ labels : changing-submodules-on-purpose
42+
43+ - name : Comment on Pull Request
44+ uses : actions/github-script@v7
45+ with :
46+ github-token : ${{secrets.GITHUB_TOKEN}}
47+ script : |
48+ const pr_number = context.payload.workflow_run.pull_requests[0].number;
49+ github.issues.createComment({
50+ owner: context.repo.owner,
51+ repo: context.repo.repo,
52+ issue_number: pr_number,
53+ body: "Please merge this PR using **Merge Commit**."
54+ });
You can’t perform that action at this time.
0 commit comments