Skip to content

Commit 0bf05ea

Browse files
committed
Adding instructions on updating the fork with the mirror workflow
1 parent 1965299 commit 0bf05ea

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

Readme.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,37 @@ Fork the [DotNest Core SDK](https://github.com/Lombiq/DotNest-Core-SDK) reposito
3333

3434
## Working with the repository
3535

36-
- In case new commits are pushed to your fork from the original repository, check the changes (e.g. new modules might be added that you also need to add to your custom solution) and merge `dev` to your development branch.
3736
- Whenever you create any branches, make sure to choose names that don't collide with the ones in the SDK. If your project is called e.g. `Awesome Project`, then your development branch should be created on top of `dev` and name it e.g. `dev-ap`.
3837
- We recommend you create such a development branch and set it as the default branch of your fork.
3938
- For clarity, rename the solution file to what you prefer, e.g. _AwesomeProject.DotNestSites.sln_.
4039

40+
## Updating your fork with changes from the SDK
41+
42+
- If your repository is an actual fork, you can use the [`Sync fork` feature](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) on GitHub to manually update it.
43+
- Regardless of whether your repository is a fork or not, you can also automate updating its `dev` branch from the SDK using our [Mirror branches workflow](https://github.com/Lombiq/GitHub-Actions/blob/dev/Docs/Workflows/Productivity/MirrorBranches.md). A minimal mirror workflow looks like this (you need to update the `destination-repository` parameter and set up a secret for `DESTINATION_TOKEN`):
44+
45+
```yaml
46+
name: Mirror from SDK
47+
48+
on:
49+
workflow_dispatch:
50+
schedule:
51+
- cron: '0 0 * * *' # Once every day.
52+
53+
jobs:
54+
mirror-from-sdk:
55+
name: Mirror from SDK
56+
uses: Lombiq/GitHub-Actions/.github/workflows/mirror-branches.yml@dev
57+
with:
58+
source-repository: Lombiq/DotNest-Core-SDK
59+
destination-repository: AwesomeDeveloper/Awesome-Project
60+
branch-names: dev
61+
secrets:
62+
DESTINATION_TOKEN: ${{ secrets.AWESOME_PROJECT_MIRROR_TOKEN }}
63+
```
64+
65+
In case new commits are pushed to your fork from the SDK, check the changes (e.g. new modules might be added that you also need to add to your custom solution) and merge `dev` into your development branch.
66+
4167
## Theme development
4268

4369
### Creating the theme

0 commit comments

Comments
 (0)