-
Notifications
You must be signed in to change notification settings - Fork 10
34 lines (30 loc) · 1005 Bytes
/
create_PR.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
# trunk-ignore-all(checkov/CKV2_GHA_1)
#
# pipeline to raise a pull request
#
name: Raise Pull request for specified Branch
on:
workflow_dispatch:
jobs:
raise_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Check if a valid branch name is selected. Not main and not any tag"
run: |
if [ "${{ github.ref_name }}" == "main" || "${{ github.ref_type}}" == "tag" ]; then
echo "Cant create a pull on main or a tag. choose valid branch."
exit 1
fi
- name: Raise Pull Request
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
title: "Creating PR for branch ${{ github.ref_name }} "
label: "v${{ github.ref_name }},version-update"
source_branch: "${{ github.ref_name }}"
target_branch: "main"
get_diff: true