Codebase list votca-xtp / debian/1.6.3-1 .github / workflows / create-pr.yml
debian/1.6.3-1

Tree @debian/1.6.3-1 (Download .tar.gz)

create-pr.yml @debian/1.6.3-1raw · history · blame

name: Create PR
on:
  push:
    branches:
      - stable

jobs:
  PR:
    name: Create
    if: github.repository_owner == 'votca'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@master
        with:
          ref: ${{ github.event.ref }}
          fetch-depth: 0
          token: ${{ secrets.VOTCA_BOT_TOKEN }}
      - name: Try to merge master branch
        run: |
          git config --global user.name "Votca Bot"
          git config --global user.email "github@votca.org"
          git checkout -b stable_fixes
          git merge origin/master || true
          git push origin stable_fixes
      - name: Create Pull Request
        uses: actions/github-script@0.3.0
        with:
          github-token: ${{ secrets.VOTCA_BOT_TOKEN }}
          script: |
            github.pulls.create({
              owner: 'votca',
              repo: 'xtp',
              title: 'Fixes from stable',
              head: 'stable_fixes',
              base: 'master'
            })