-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: auto syncing between public and private master #615
Conversation
7f34b3d
to
79cf514
Compare
79cf514
to
7159dc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noice! This opens a PR on the private repo?
yes. Once |
- uses: actions/checkout@v2 | ||
- name: Repository Dispatch | ||
if: github.repository == 'omisego/plasma-contracts' | ||
uses: peter-evans/repository-dispatch@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is peter evans? Sorry. I haven’t used gh actions before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know either. I just randomly picked from the Github action market place
https://github.com/marketplace/actions/repository-dispatch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, since it is fairly simple, I tried to remove those marketplace dependencies with shell scripts instead.
test: tmp change branch cleanup: remove tmp comment codes
108e98d
to
37a223e
Compare
37a223e
to
e6b208d
Compare
e6b208d
to
2fa36b1
Compare
Note
Setup a auto sync Github action workflow to:
master
in public repo, it would dispatch an event to the private repo. (with event_type:sync-from-public
)master
of the private with the public repo.master
branch is synced, it would automatically submit a PR to sync master back to the base branch of the private repo (master-private
)HOUSE_KEEPER_BOT_TOKEN
as Github secret of the repo (both public & private)Note that the dispatch event requires the workflow file to be in the base branch (usually master) to be able to work. see: https://github.community/t5/GitHub-Actions/repository-dispatch-not-triggering-actions/td-p/33817
Also, this means this would only take effect after this PR is merged and sync the change to the base branch of
plasma-contracts-private
.Test
This setup requires it to be in master (or the base branch) of the repo, as a result, I was using my own public fork and messing around the
plasma-contracts-private
repo to test.It was tested by replacing some of the repo with
boolafish/plasma-contracts
instead ofomisego/plasma-contracts