-
Notifications
You must be signed in to change notification settings - Fork 13
58 lines (53 loc) · 1.75 KB
/
Copy pathreintegrate-master.yml
File metadata and controls
58 lines (53 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: "Reintegrate master"
on:
push:
branches:
- master
env:
REINTEGRATE_BRANCH_NAME: reintegrate-main
jobs:
reintegrate-master:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@v6
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
submodules: true
- name: Configure git
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config push.autoSetupRemote true
- name: Switch to intermediate branch
run: git checkout -b $REINTEGRATE_BRANCH_NAME
- name: Push intermediate Branch
run: git push -f
- name: Check for existing pull-request
id: check_pr_count
run: >
echo "pr_count=$(gh pr list --head $REINTEGRATE_BRANCH_NAME --limit 1 --base develop --state open --json state --jq 'length')" >> "$GITHUB_OUTPUT"
- name: Create pull-request
if: ${{ steps.check_pr_count.outputs.pr_count == 0 }}
run: >
gh pr create
-l automated
-a awildturtok,thoniTUB
-r awildturtok,thoniTUB
-B develop
--title "chore: reintegrate main branch"
--body "Merge main branch back into develop branch"
--head $REINTEGRATE_BRANCH_NAME
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Modify the request in the scope of a PAT (an actual user).
# This should allow to trigger subsequent actions with the merge commit.
- name: Modify pull request
run: >
gh pr merge
--merge
--auto
--delete-branch
env:
GH_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}