name: main to snapshot auto merger on: push: branches: - main jobs: automerge: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: '0' # 0 == fetch all history history ref: 'snapshot' token: ${{ secrets.AUTOMERGE_PAT }} - run: | git config user.name github-actions git config user.email github-actions@github.com git fetch origin git merge origin/main --no-edit git push