Merge pull request #80 from steadfasterX/allowpush-toany
allow specifying custom target server domain
This commit is contained in:
@@ -31,7 +31,8 @@ Configure the action with a branch on your `target` repo - the one you want to u
|
||||
### Input Variables
|
||||
|
||||
| Name | Required? | Default | Example |
|
||||
| -------------------------- | :----------------: | ------- | ---------------------------------------- |
|
||||
| -------------------------- | :----------------: | ------------ | ---------------------------------------- |
|
||||
| target_host_domain | | 'github.com' | 'codeberg.org' |
|
||||
| target_sync_branch | :white_check_mark: | | 'master', 'main', 'my-branch' |
|
||||
| target_repo_token | :white_check_mark: | | ${{ secrets.GITHUB_TOKEN }} |
|
||||
| upstream_repo_access_token | | | ${{ secrets.NAME_OF_TOKEN }} |
|
||||
|
||||
@@ -72,6 +72,11 @@ inputs:
|
||||
required: true
|
||||
default: 'github.com'
|
||||
|
||||
target_host_domain:
|
||||
description: 'Domain name to be used in target repo URL.'
|
||||
required: false
|
||||
default: 'github.com'
|
||||
|
||||
shallow_since:
|
||||
description: 'Length of time used when fetching shallow repo data, should match how often you perform a sync'
|
||||
required: true
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ push_new_commits() {
|
||||
# TODO: figure out how this would work in local mode...
|
||||
# update remote url with token since it is not persisted during checkout step when syncing from a private repo
|
||||
if [ -n "${INPUT_TARGET_REPO_TOKEN}" ]; then
|
||||
git remote set-url origin "https://${GITHUB_ACTOR}:${INPUT_TARGET_REPO_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
git remote set-url origin "https://${GITHUB_ACTOR}:${INPUT_TARGET_REPO_TOKEN}@${INPUT_TARGET_HOST_DOMAIN}/${GITHUB_REPOSITORY}.git"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
|
||||
Reference in New Issue
Block a user