|
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" |