-
Notifications
You must be signed in to change notification settings - Fork 293
39 lines (33 loc) · 1.03 KB
/
release-merge.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
# Merges changes to release branches back into main.
name: release-merge
on:
push:
branches:
- 'release/**'
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Merge
run: |
echo '> Configuring ssh...'
SSH_HOME="${HOME}/.ssh"
mkdir -p "${SSH_HOME}"
chmod 700 "${SSH_HOME}"
echo '> Starting ssh-agent...'
eval $(ssh-agent)
echo '> Add Github to known_hosts...'
ssh-keyscan -H github.com >> "${SSH_HOME}/known_hosts"
chmod 644 "${SSH_HOME}/known_hosts"
echo '> Adding DEPLOY_KEY...'
ssh-add - <<< "${{ secrets.DEPLOY_KEY }}"
echo '> Attempting merge...'
ls -al
git config --global user.name "github-bot"
git config --global user.email "[email protected]"
git clone [email protected]:${GITHUB_REPOSITORY}.git
cd pack
git checkout main
git merge origin/${GITHUB_REF#refs/heads/} --no-edit
git show -1
git push