generated from AndreasAugustin/template
-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug fix version bump 0.7.1-draft (#305)
* feat 🚀 add test for gitlab repo (#278) * feat 🚀 add test for gitlab repo (#278) * feat 🚀 add test for gitlab repo (#278) * doc: 📝 document the usage of other git providers (#278) * release(v0.7.1-draft): 🚀 bug fix release (#278)
- Loading branch information
1 parent
e8b7f32
commit 397291d
Showing
5 changed files
with
51 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: actions-template-sync | ||
uses: AndreasAugustin/[email protected].0-draft | ||
uses: AndreasAugustin/[email protected].1-draft | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_repo_path: AndreasAugustin/template | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: test-ssh-gitlab | ||
|
||
on: | ||
pull_request: | ||
push: | ||
# manual trigger | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-implementation-job: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# To use this repository's private action, you must check out the repository | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Test action step ssh | ||
uses: ./ # Uses an action in the root directory | ||
with: | ||
hostname: ${{ secrets.SOURCE_REPO_GITLAB_HOSTNAME }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_repo_path: ${{ secrets.SOURCE_REPO_GITLAB_PATH }} # <owner/repo>, should be within secrets | ||
source_repo_ssh_private_key: ${{ secrets.SOURCE_REPO_GITLAB_SSH_PRIVATE_KEY }} # contains the private ssh key of the private repository | ||
is_dry_run: true | ||
is_not_source_github: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,13 +32,10 @@ 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. | ||
|
||
## Usage | ||
|
||
### Update | ||
|
||
starting with version v0.5.2-draft the `templateversionrc` file is not needed anymore. You can delete that file from the target repositories. | ||
|
||
### Public template repository | ||
|
||
Add this configuration to your github action | ||
|
@@ -61,7 +58,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: actions-template-sync | ||
uses: AndreasAugustin/[email protected].0-draft | ||
uses: AndreasAugustin/[email protected].1-draft | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_repo_path: <owner/repo> | ||
|
@@ -94,7 +91,7 @@ jobs: | |
private_key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- name: actions-template-sync | ||
uses: AndreasAugustin/[email protected].0-draft | ||
uses: AndreasAugustin/[email protected].1-draft | ||
with: | ||
github_token: ${{ steps.generate_token.outputs.token }} | ||
source_repo_path: <owner/repo> | ||
|
@@ -109,6 +106,7 @@ An example are [deployment keys][deployment-keys]. For our use case write permis | |
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. | ||
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. | ||
|
||
```yaml | ||
jobs: | ||
|
@@ -120,7 +118,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: actions-template-sync | ||
uses: AndreasAugustin/[email protected].0-draft | ||
uses: AndreasAugustin/[email protected].1-draft | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # <owner/repo>, should be within secrets | ||
|
@@ -144,6 +142,7 @@ jobs: | |
| hostname | `[optional]` the hostname of the repository | `false` | `github.com` | | ||
| is_dry_run | `[optional]` set to `true` if you do not want to push the changes and not want to create a PR | `false` | | | ||
| is_allow_hooks | `[optional]` set to `true` if you want to enable lifecycle hooks. Use this with caution! | `false` | `false` | | ||
| is_not_source_github | `[optional]` set to `true` if the source git provider is not GitHub | `false` | `false` | | ||
|
||
### Example | ||
|
||
|
@@ -220,6 +219,10 @@ To ignore those, simply create a file in the root directory named `.templatesync | |
Open your project `Settings > Actions > General` and select the checkbox `Allow Github Actions to create and approve pull requests` | ||
under the `Workflow permissions` section. | ||
|
||
## Release Updates | ||
|
||
starting with version v0.5.2-draft the `templateversionrc` file is not needed anymore. You can delete that file from the target repositories. | ||
|
||
## Debug | ||
|
||
You must create a secret named `ACTIONS_STEP_DEBUG` with the value `true` to see the debug messages set by this command in the log. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters