-
Notifications
You must be signed in to change notification settings - Fork 18
27 lines (24 loc) · 969 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
name: Auto Pull Request on Push
on:
push:
branches:
- '*'
# if: "!contains(github.ref, 'main')"
jobs:
create_pull_request:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
token: ${{ secrets.PR_TOKEN }}
branch: ${{ github.ref }}
base: main
commit-message: 'Automated pull request from ${{ github.ref }} on ${{ format(github.event.head_commit.timestamp) }}'
title: New pull request from ${{ github.ref }} on ${{ format(github.event.head_commit.timestamp, 'DD/MM/YY HH:mm:ss') }}
body: Please review the changes made from ${{ github.ref }} on ${{ format(github.event.head_commit.timestamp, 'DD/MM/YY HH:mm:ss') }}
draft: false
# if: github.event.pull_request.head.ref != 'main'