name: Rebase sql-psi-dev onto master

on:
  push:
    branches:
      - master

jobs:
  rebase:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - run: |
          git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
          git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
          git checkout sql-psi-dev
          git rebase master
          git push -f origin sql-psi-dev
      - name: Create a pull request if failure
        if: failure()
        uses: vsoch/pull-request-action@1.0.6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH_PREFIX: "rebase-sql-psi/"
          PULL_REQUEST_BRANCH: "sql-psi-dev"
          PULL_REQUEST_FROM_BRANCH: "master"

name: Rebase sql-psi-dev onto master

on:
  push:
    branches:
      - master

jobs:
  rebase:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - run: |
          git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
          git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
          git checkout sql-psi-dev
          git rebase master
          git push -f origin sql-psi-dev
      - name: Create a pull request if failure
        if: failure()
        uses: repo-sync/pull-request@v2
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          destination_branch: "sql-psi-dev"
          source_branch: "master"

Use this other github action which doesnt use environment variables
Use this other github action which doesnt use environment variables
