diff --git a/README.md b/README.md index 582f933..26dfeb3 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,15 @@ This GitHub action will help you to keep track of the template changes. * Ignore files and folders from syncing using a `.templatesyncignore` file * many configuration options * different lifecycle hooks are supported -* different git provider. Default is GitHub, GitLab is also tested. See [.github/workflows/test_ssh_gitlab.yml] for an example. +* different git provider. Default is GitHub, GitLab is also tested. See [.github/workflows/test_ssh_gitlab.yml](.github/workflows/test_ssh_gitlab.yml) for an example. ## Usage +Usage changes depending on whether the template repository is public or private, regardless of the visibility of current repository. + ### Public template repository -Add this configuration to your github action +Add this configuration to a github action in the current repository: ```yaml # File: .github/workflows/template-sync.yml @@ -66,15 +68,15 @@ jobs: pr_labels: ,[,...] # optional, no default ``` -You will receive a pull request within your repository if there are some changes available. +You will receive a pull request within your repository if there are some changes available in the template. ### Private template repository -If you have a private template repository. +If your current repository was created from a private template, there are 2 possibilities. -#### Using github app +#### 1. Using github app -You can create and use a [GitHub App][github-app] to handle the access to your private repository. +You can create and use a [GitHub App][github-app] to handle the access to the private template repository. To generate a token for your app you can use a separate action like [tibdex/github-app-token][github-app-token]. ```yaml @@ -99,11 +101,11 @@ jobs: pr_labels: ,[,...] # optional, no default ``` -#### SSH +#### 2. SSH You have various options to use ssh keys with GitHub. -An example are [deployment keys][deployment-keys]. For our use case write permissions are not needed.i -Within the repository where the GitHub action is enabled add a secret (e.q. `SOURCE_REPO_SSH_PRIVATE_KEY`) with the content of your private SSH key. +An example are [deployment keys][deployment-keys]. For our use case write permissions are not needed. +Within the current repository, where the GitHub action is enabled, add a secret (e.q. `SOURCE_REPO_SSH_PRIVATE_KEY`) with the content of your private SSH key. Make sure that the read permissions of that secret fulfil your use case. Set the optional `source_repo_ssh_private_key` input parameter. It is also possible to use a different git provider, e.g. GitLab.