-
-
Save nmurakami0/556ff0baf9e035a487c72c87baa29053 to your computer and use it in GitHub Desktop.
create a pull request for staging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: create a pull request for staging | |
on: | |
pull_request: | |
types: [ opened ] | |
branches: [ master ] | |
jobs: | |
action: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set variables | |
run: | | |
echo 'PR_BODY<<EOF' >> $GITHUB_ENV | |
echo "the same as #${{ github.event.pull_request.number }}" >> $GITHUB_ENV | |
echo "" >> $GITHUB_ENV | |
echo "---" >> $GITHUB_ENV | |
echo "" >> $GITHUB_ENV | |
echo "${{ github.event.pull_request.body }}" >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
- name: pull-request | |
uses: repo-sync/pull-request@v2 | |
with: | |
source_branch: "${{ github.event.pull_request.head.ref }}" | |
destination_branch: staging | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
pr_label: staging | |
pr_title: "${{ github.event.pull_request.title }}" | |
pr_body : | | |
${{ env.PR_BODY }} | |
- name: Labeling | |
uses: andymckay/labeler@master | |
with: | |
add-labels: "master" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment