Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/pull_request_closed.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: Pull Request Closed

on:
pull_request:
branches: [master]
types: [closed]

jobs:
cherry_pick:
if: ${{github.event.pull_request.merged == true}}
runs-on: ubuntu-22.04
steps:
- name: Should create PR to production?
uses: peter-evans/find-comment@v1
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
id: fc
with:
issue-number: ${{github.event.number}}
Expand Down Expand Up @@ -39,26 +41,22 @@ jobs:
echo "##[set-output name=branch;]$(echo ${BRANCH_NAME})"
- name: Failed cherry-pick
if: ${{ failure() }}
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
issue-number: ${{github.event.number}}
body: |
Automatic cherry-pick & PR to production failed. Ping @telerik/blazor-admins for manual cherry-pick and push to production.
- name: pull-request
id: pr
if: steps.fc.outputs.comment-id != ''
uses: repo-sync/pull-request@v2
uses: actions/checkout@v3
with:
destination_branch: "production"
source_branch: ${{ steps.cp.outputs.branch }}
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_title: "Merge ${{ steps.cp.outputs.branch }} into production"
pr_body: |
*This is automatically generated PR*
PR from master branch: #${{github.event.number}}. Once the change is merged, upload the changes to LIVE.
token: '${{ secrets.GITHUB_TOKEN }}'
run: |
gh pr create --base production --head ${{ steps.cp.outputs.branch }} --title "Merge ${{ steps.cp.outputs.branch }} into production" --body "Automatically generated PR from master branch: #${{github.event.number}}. Once the change is merged, upload the changes to LIVE."
- name: Post PR link
if: steps.pr.outputs.pr_url != ''
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
issue-number: ${{github.event.number}}
body: |
Expand Down