-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 1.45 KB
/
release-main.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
on:
pull_request:
types: [closed]
name: release-main
jobs:
pullrequest:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && contains(toJSON(github.event.pull_request.labels), 'autorelease') && github.base_ref == 'develop'
runs-on: ubuntu-latest
steps:
- name: print
run: echo "${{ toJSON(github.event.pull_request.head.ref) }}"
- name: checkout
uses: actions/checkout@v2
- name: Initialize Pull Request
id: open-pr
uses: repo-sync/pull-request@v2
with:
source_branch: "${{ github.event.pull_request.head.ref }}"
destination_branch: "main"
pr_title: "chore: sync ${{ github.event.pull_request.head.ref }} to main"
pr_body: ":crown: *Autogenerated* - sync ${{ github.event.pull_request.head.ref }} to main"
pr_assignee: "bgsandan" # Comma-separated list (no spaces)
pr_label: "autorelease: main,automerge" # Comma-separated list (no spaces)
pr_allow_empty: true # Creates pull request even if there are no changes
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Automerge
uses: juliangruber/merge-pull-request-action@v1
with:
github-token: "${{ secrets.TOKEN }}"
number: ${{steps.open-pr.outputs.pr_number}}