Skip to content

Commit

Permalink
Added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar-gg authored Sep 27, 2024
1 parent 92d20cc commit 2ec5a65
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Test fork sync

Repo:
Forked repo with sync: https://github.com/roborregosteam/test-sync

[Workflow templates used](https://github.com/RoBorregos/.github/tree/main/workflow-templates)

## Steps to reproduce

1. Create workflows (either by using a workflow template, or by copy-pasting the ones in [this folder](https://github.com/RoBorregos/test-sync/tree/main/.github/workflows))
2. Add org secrets with the required permissions
- E.g. `secrets.RBRGS_TEAM_GITHUB_TOKEN`: token used to create repo, sync forks, etc on the account that owns the forks.
3. Modify `PERSONAL_ACCOUNT` env variable: this corresponds to the account that will house the forks(`roborregosteam` in this example). Note: could also be stored as a secret to hide the account. In such case, the secret must also be added in the account that owns the forks (that is, so that the repo's forked workflow can cancel itself via `if: ${{ github.repository_owner != secrets.PERSONAL_ACCOUNT }}`).
4. Builds are used to trigger forks on success. Builds may need env variables. You can add mock env variables in the same job that performs the build (e.g `echo "DISCORD_CLIENT_ID=12345678" >> .env`).

## Considerations

1. Beware of loops caused by workflows
2. Some of the repositories must be public for usage without github enterprise.

0 comments on commit 2ec5a65

Please sign in to comment.