Add Github Actions support / example
dkarlovi opened this issue · comments
Dalibor Karlović commented
Since usage with other CI tools is documented, adding GH actions support makes sense.
Craig Heydenburg commented
@jderusse any ideas here?
Baptiste Leduc commented
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 😉
Olivier Dolbeau commented
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 }}