Multiple write deploy keys

Hey there,

I’m searching for a solution for my CI/CD setup.
I got 2 repositories repo1 and repo2 while repo2 uses repo1 and should be built when repo1 is built as well.
The built of repo1 should look like this:

Pre:

  1. Install global dependencies
  2. checkout repo1 at /
  3. Install dependencies for repo1
  4. Checkout repo2 inside repo1 (temporary folder) at /repo1/repo2
  5. Install dependencies for repo2

Main:

  1. Lint the sources and run the tests
  2. Build the distribution files
  3. Bump the patch version
  4. Create the change log
  5. Commit that stuff
  6. Create a git tag with new version
  7. Push branch and tag to github
  8. Create a github release for tag using the changelog

Post:

  1. Navigate to /repo1/repo2 and build it
  2. Push changes to github pages of repo2

So given this steps it’s pretty obvious that I need read and write access to two GitHub repositories. One way might be to just add a user key for another robot user which I somehow don’t like^^
Another way could be to create a deploy key for each repository with write access and add them all to the build.
Here it seem to be the problem that I have to add the host for the key and one is overwriting the other which lead to only one accessible repository. Also a deploy key can only be added to one repository at the same time.

I also had a look on how to trigger the build for repo2 seperately but this seem to be not supported by any of those CI services in a nice way.

So do you have any other idea how to build repo1 and build then repo2 or at least how to get access to multiple repositories without having a user key?