Skip to content

🚀 Initiate Publish #18

🚀 Initiate Publish

🚀 Initiate Publish #18

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
});