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.
Browse files
Browse the repository at this point in the history
* feat: 🚀 (#328 #316) add params for git user.name, user.email and git remote pull params * doc: 📝 fix linter issue * fix: 🐛 fix default variable * fix: 🐛 fix cmd args from string * fix: 🐛 fix cmd args from string * fix: 🐛 fix cmd args from string * fix: 🐛 fix cmd args from string * doc: 📝 version bump v0.8.0
- Loading branch information
1 parent
e23a2c4
commit 6038fdf
Showing
6 changed files
with
25 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
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 |
---|---|---|
|
@@ -23,4 +23,4 @@ keywords: | |
- github | ||
- repo-sync | ||
license: MIT | ||
version: v0.7.3 | ||
version: v0.8.0 |
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 |
---|---|---|
|
@@ -85,7 +85,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: actions-template-sync | ||
uses: AndreasAugustin/actions-template-sync@v0.7.3 | ||
uses: AndreasAugustin/actions-template-sync@v0.8.0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_repo_path: <owner/repo> | ||
|
@@ -118,7 +118,7 @@ jobs: | |
private_key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- name: actions-template-sync | ||
uses: AndreasAugustin/actions-template-sync@v0.7.3 | ||
uses: AndreasAugustin/actions-template-sync@v0.8.0 | ||
with: | ||
github_token: ${{ steps.generate_token.outputs.token }} | ||
source_repo_path: <owner/repo> | ||
|
@@ -146,7 +146,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: actions-template-sync | ||
uses: AndreasAugustin/actions-template-sync@v0.7.3 | ||
uses: AndreasAugustin/actions-template-sync@v0.8.0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # <owner/repo>, should be within secrets | ||
|
@@ -198,7 +198,7 @@ jobs: | |
uses: actions/checkout@v3 | ||
- | ||
name: Test action step PAT | ||
uses: AndreasAugustin/actions-template-sync@v0.7.3 | ||
uses: AndreasAugustin/actions-template-sync@v0.8.0 | ||
with: | ||
github_token: ${{ secrets.SOURCE_REPO_PAT }} | ||
source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # <owner/repo>, should be within secrets | ||
|
@@ -220,6 +220,9 @@ jobs: | |
| 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` | | ||
| git_user_name | `[optional]` set the committer git user.name | `false` | `${GITHUB_ACTOR}` | | ||
| git_user_email | `[optional]` set the committer git user.email | `false` | `[email protected].${SOURCE_REPO_HOSTNAME}` | | ||
| git_remote_pull_params |`[optional]` set remote pull parameters | `false` | `--allow-unrelated-histories --squash --strategy=recursive -X theirs` | | ||
|
||
### Example | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,8 @@ fi | |
|
||
DEFAULT_REPO_HOSTNAME="github.com" | ||
SOURCE_REPO_HOSTNAME="${HOSTNAME:-${DEFAULT_REPO_HOSTNAME}}" | ||
GIT_USER_NAME="${GIT_USER_NAME:-${GITHUB_ACTOR}}" | ||
GIT_USER_EMAIL="${GIT_USER_EMAIL:-github-action@actions-template-sync.noreply.${SOURCE_REPO_HOSTNAME}}" | ||
|
||
# In case of ssh template repository this will be overwritten | ||
SOURCE_REPO_PREFIX="https://${SOURCE_REPO_HOSTNAME}/" | ||
|
@@ -52,8 +54,8 @@ function git_init() { | |
echo "::group::git init" | ||
info "set git global configuration" | ||
|
||
git config --global user.email "[email protected].${SOURCE_REPO_HOSTNAME}" | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GIT_USER_EMAIL}" | ||
git config --global user.name "${GIT_USER_NAME}" | ||
git config --global pull.rebase false | ||
git config --global --add safe.directory /github/workspace | ||
git lfs install | ||
|
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