roam-to-git icon indicating copy to clipboard operation
roam-to-git copied to clipboard

Github Actions workflow based on public repository, but committing to the private one

Open Stvad opened this issue 6 years ago • 3 comments

See start of the discussion in #4. The point is to run the WF on public repo, hence working around the limit on WFs on private repos

some relevant links:

  • https://github.com/actions/checkout allows checkout of private repo
  • https://github.com/marketplace/actions/git-sync-action
  • https://github.com/ad-m/github-push-action

Stvad avatar Apr 19 '20 19:04 Stvad

If I understand it correctly, actions/checkout would be enough:

  • Create a private repository for the notes
  • Create a public repository for the actions
  • In the public repository, create an github action yaml, with the steps
    • https://github.com/actions/checkout
    • roam-to-git notes
  • In the public repository, configure the secrets github.repository, github.token in addition to the Roam secrets.

I have a doubt if ssh-key is needed.

Do you agree?

MatthieuBizien avatar Apr 21 '20 10:04 MatthieuBizien

you're right, that actually worked!

Stvad avatar Apr 22 '20 04:04 Stvad

https://github.com/Stvad/roam-notes-workflow/blob/master/.github/workflows/run_backup.yml

Stvad avatar Apr 22 '20 04:04 Stvad