Files
runner-images-sangeeth/.github/workflows/create_pull_request.yml
Vladimir Safonkin dd518dff50 Resolve possible conflicts in software update PR (#1394)
* Resolve possible conflicts in software update PR

* Push updated release branch to repo

* Setup committer's name and email

* Minor fix

* Add step to create branch for PR

* Add pause before merging

* Minor renaming

* Add step to delete docs branch
2020-08-28 16:26:41 +03:00

35 lines
1.1 KiB
YAML

name: Create Pull Request
on:
repository_dispatch:
types: [create-pr]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Clone release branch to create pull request
run: |
git checkout ${{ github.event.client_payload.ReleaseBranchName }}
git branch ${{ github.event.client_payload.ReleaseBranchName }}-docs
git push origin ${{ github.event.client_payload.ReleaseBranchName }}-docs
- name: Create pull request for ${{ github.event.client_payload.ReleaseBranchName }}
uses: actions/github-script@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: "${{ github.event.client_payload.PullRequestTitle }}",
head: "${{ github.event.client_payload.ReleaseBranchName }}-docs",
base: "${{ github.event.client_payload.PullRequestBase }}",
body: `${{ github.event.client_payload.PullRequestBody }}`
});