jderusse / docker-gitsplit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Github Actions support / example

dkarlovi opened this issue · comments

Since usage with other CI tools is documented, adding GH actions support makes sense.

@jderusse any ideas here?

I'm actually using it on Jane, here is my action: https://github.com/janephp/janephp/blob/next/.github/workflows/gitsplit.yml

You can't use the checkout action because you need more that just the last commit, I find it easier to take everything. And you need a custom token because the GH Action generated one doesn't have the required roles.

I'll make a PR tomorrow 😉

Here is mine, if you need another example. :)

name: Sync repositories

on:
  push:
    branches:
      - master

jobs:
  splitsh:
    name: Splitsh
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Split repositories
        uses: docker://jderusse/gitsplit:latest
        with:
          args: gitsplit
        env:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}