name: Update Base Branch Command on: issue_comment: types: [created] jobs: deploy: runs-on: ubuntu-latest if: >- github.event.issue.pull_request != '' && ( contains(github.event.comment.body, '/update') ) permissions: pull-requests: write contents: write steps: - uses: actions/checkout@v2 with: fetch-depth: 0 # Fetch all history so we can merge branches ref: refs/pull/${{ github.event.issue.number }}/head - name: Fetch All Branches run: git fetch --all # - name: Checkout PR # run: git checkout ${{ github.event.issue.pull_request.head.ref }} - name: Merge From Next run: git merge origin/next --strategy-option=theirs - name: Push Changes run: git push