forked from jakartaee/data
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 966 Bytes
/
pull-request.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
# This is a reusable workflow for creating a pull request for an existing branch in github
name: Create a pull request
on:
workflow_call:
inputs:
branch:
required: true
type: string
title:
required: true
type: string
body:
required: true
type: string
jobs:
pull:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Check branch
id: check
run: .github/scripts/checkout.sh ${{ inputs.branch }}
- name: Create pull request
if: steps.check.outputs.branch_existed == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--base main \
--head ${{ inputs.branch }} \
--title "${{ inputs.title }}" \
--body "${{ inputs.body }}" \
--label 'bot'