🚀 Initiate Publish #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
}); | |