-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.03 KB
/
initiate-publish.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
40
name: 🚀 Initiate Publish
on:
workflow_dispatch:
inputs:
branch:
description: 'Head branch'
required: true
default: 'develop'
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
initiate_publish:
name: 🚀 Initiate Publish
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/checkout@v4
with:
token: ${{ env.GITHUB_TOKEN }}
fetch-depth: 0
- name: 🔄 Create Merge Request
uses: actions/github-script@v7
with:
script: |
github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
head: '${{ github.event.inputs.branch }}',
base: 'main',
title: 'Merge ${{ github.event.inputs.branch }} into main',
body: 'Automatically created merge request from workflow',
maintainer_can_modify: true
});