Creates a pull request in the specified directory's repo.
- name: Create Pull Request
uses: brownuniversity/create-pull-request@v1
directory
: Directory in which to create the branchbranch-name
commit-message
title
: PR title
description
: PR descriptiondraft
: Create draft PRtoken
: Personal Access Token (defaults togithub.token
)
new-pr-url
: URL of created PR
jobs:
main:
name: main
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
with:
path: main
- name: Checkout Destination Repo
uses: actions/checkout@v3
with:
repository: "BrownUniversity/destination-repo"
path: destination
token: ${{ secrets.PAT }}
- name: Make change to destination repo
run: cp main/file.txt destination/file.txt
- name: Create Pull Request in Destination Repo
id: pull-request
uses: brownuniversity/create-pull-request@v1
with:
token: ${{ secrets.PAT }}
branch-name: task/update-file
commit-message: "Update file"
title: "Update file"
description: "Fixed comma splice"
draft: true
directory: "destination"
- name: Print PR URL
run: echo ${{ steps.pull-request.outputs.new-pr-url }}