I’m quite a noob, when it comes to actually work with github, though I used to work with git to version my work since quite a while. So my approach / plan could be totally wrong.

I hope anybody out there could help me, give me the right idea.

What I have:

My Project is hosted on a self hosted forgejo instance on my lan. I have two branches, dev and main. Everytime I push to dev, a forgejo workflow I wrote builds a fresh docker-image and restarts the container. I can test the new Image right away, which is quite neat.

The project has reached a point, where

a) I’m not embarrassed anymore about my code

b) I think, this could be a nice docker image for others

c) I also think it would be cool if maybe others would contribute

Enter Github

I set up mirroring forgejo to github. But since my dev branch has my forgejo workflows workflow file (containing some details about my local server infrastructure) I decided to only mirror the main branch, which has that workflow excluded from the repo.

I also set up a github workflow (action) where, when my commit to main was properly tagged, it will create and register a ‘latest’-tagged docker-image for the public.

This can all be done just by using my IDE and has a low manual workflow footprint. (Develop on dev, push, test on local server. When happy, checkout main, merge dev to main, push: image is live)

This all works great.

The only flaw in all of this is, that, even if I’d allow to do PRs from the public main branch on github, forgejo would never see that, means: Nobody may be able to contribute.

I’m at the point, where I think, maybe my whole concept is wrong.

How could I set all this stuff up, to:

  • still build local images
  • still build public images
  • allow github users to do PRs

all of that without building something that requires a tedious amount of manual workflow steps.

  • Matt The Horwood
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    The best thing you can do is either move to GitHub and write workflows there that match your forgejo stuff, or allow remote access to your forgejo.

    I would move to GitHub and be done with it, if forgejo has a remote to local mirror you could still backup the repo to your own servers

    • HairyHarry@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      Or just leave forgejo out of it all and just tag the “test” commits to “dev-latest”, set up another container just pulling dev-latest and be good with it.

      Thanks, I think I just will do that.