-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.1 KB
/
mergeMainNext.yml
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
#------------------------------------------------------------------------------
# Lawrence McDaniel - https://lawrencemcdaniel.com
# Version Bump Workflow
#
# Used mostly to propagate Dependabot pushed to main to the next branch. Use
# cases:
# - Dependabot pushes to main
# - Manual push to main
# - back propagation of modifications to __version__.py
#------------------------------------------------------------------------------
name: Merge main into next
on:
workflow_dispatch:
push:
branches:
- main
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Merge main into next
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout main
git pull
git checkout next
git merge main
git push https://${{ secrets.PAT }}@github.com/${{ github.repository }}.git HEAD:next
env:
GITHUB_TOKEN: ${{ secrets.PAT }}