forked from commaai/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (49 loc) · 1.62 KB
/
Copy pathmerge_command.yml
File metadata and controls
49 lines (49 loc) · 1.62 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
name: Merge Command
on:
repository_dispatch:
types: [merge-command]
jobs:
merge_pr:
name: merge pr
runs-on: ubuntu-20.04
timeout-minutes: 50
env:
USER_NAME: "${{ github.event.client_payload.pull_request.head.user.login }}"
HEAD_REF: "${{ github.event.client_payload.pull_request.head.ref }}"
PR_NUM: "${{ github.event.client_payload.pull_request.number }}"
steps:
- uses: actions/checkout@v2
with:
submodules: true
lfs: true
ref: ${{ github.event.client_payload.pull_request.head.ref }}
fetch-depth: 0
token: ${{ secrets.REPO_PAT }}
- name: Setup git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Checkout src
run: |
git checkout src
- name: Merge branches
run: |
git merge --no-ff -m "Merge pull request #$PR_NUM from $USER_NAME/$HEAD_REF" $HEAD_REF
- name: Generate changelog
run: |
python tools/scripts/gen_changelog.py
- name: Commit changelog
run: |
git add CHANGELOG.md
git commit -m "docs(changelog): auto update changelog from PR #$PR_NUM"
- name: Prepare CI Env Vars
run: |
chmod +x ./.github/scripts/ci_env_vars.sh
source ./.github/scripts/ci_env_vars.sh
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.REPO_PAT }}
branch: ${{ env.MAIN_BRANCH }}
directory: .
force: false