From 5859c926aa7e5ad2e1f140973ff96781e40331e8 Mon Sep 17 00:00:00 2001 From: steadfasterX Date: Wed, 26 Feb 2025 17:17:04 +0100 Subject: [PATCH 1/3] Update action.yaml --- action.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/action.yaml b/action.yaml index 85f53a6..883bdb6 100644 --- a/action.yaml +++ b/action.yaml @@ -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 From c5152d91ea7b86f4f7ec5358fd079e6979545dd8 Mon Sep 17 00:00:00 2001 From: steadfasterX Date: Wed, 26 Feb 2025 17:21:11 +0100 Subject: [PATCH 2/3] Update push_updates.sh --- run/push_updates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run/push_updates.sh b/run/push_updates.sh index 3e0f1a4..528ff57 100644 --- a/run/push_updates.sh +++ b/run/push_updates.sh @@ -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 From 4d74dca8c6b909aa9f6d532ce2620ab9c2df584c Mon Sep 17 00:00:00 2001 From: steadfasterX Date: Tue, 31 Mar 2026 10:53:44 +0200 Subject: [PATCH 3/3] readme: add target_host_domain --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 69641bd..0a1b057 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,15 @@ Configure the action with a branch on your `target` repo - the one you want to u ### Input Variables -| Name | Required? | Default | Example | -| -------------------------- | :----------------: | ------- | ---------------------------------------- | -| 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 }} | -| upstream_sync_repo | :white_check_mark: | | 'aormsby/Fork-Sync-With-Upstream-action' | -| upstream_sync_branch | :white_check_mark: | | 'master', 'main', 'my-branch' | -| test_mode | | false | true / false | +| 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 }} | +| upstream_sync_repo | :white_check_mark: | | 'aormsby/Fork-Sync-With-Upstream-action' | +| upstream_sync_branch | :white_check_mark: | | 'master', 'main', 'my-branch' | +| test_mode | | false | true / false | **Always** set `target_repo_token` to `${{ secrets.GITHUB_TOKEN }}` so the action can push to your target repo.