update readme, add users.md
This commit is contained in:
Vendored
+5
-1
@@ -13,7 +13,11 @@
|
||||
"titleBar.activeBackground": "#215732",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#21573299",
|
||||
"titleBar.inactiveForeground": "#e7e7e799"
|
||||
"titleBar.inactiveForeground": "#e7e7e799",
|
||||
"commandCenter.border": "#e7e7e799",
|
||||
"sash.hoverBorder": "#2f7c47",
|
||||
"statusBarItem.remoteBackground": "#215732",
|
||||
"statusBarItem.remoteForeground": "#e7e7e7"
|
||||
},
|
||||
"peacock.color": "#215732"
|
||||
}
|
||||
@@ -1,44 +1,35 @@
|
||||
# Github Action: Upstream Sync
|
||||
|
||||
[Open in Visual Studio Code](https://open.vscode.dev/aormsby/Fork-Sync-With-Upstream-action)
|
||||
|
||||
## Limited Support
|
||||
|
||||
Please note that I am no longer actively working on this project. For the moment, I will continue curating fixes and updates, and I will consider merging your proposed PRs as long as they come with test support, well-documented changes, and have been thoroughly proven to work as expected. I've opened the Discussion tab on this repo, so please feel free to chat about anything there. Perhaps with enough interest we can continue development as a community. Thanks for using this Action. Happy coding.
|
||||
|
||||
## About
|
||||
|
||||
An action with forks in mind! Automatically sync a branch on your fork with the latest commits from the original repo. Keep things up to date!
|
||||
An action with forks in mind! Automatically sync a branch on your fork with the latest commits from the original repo. It should work to keep any two branches in sync. Keep all your things up to date!
|
||||
|
||||
**Bonus:** This action can also sync between branches on any two repositories. So you have options. :slightly_smiling_face:
|
||||
## Support This Project
|
||||
|
||||
**\*\*CHANGED in v3.4:\*\***
|
||||
- Bump from `node12` to `node16`
|
||||
- Update the ouptut command for `HAS_NEW_COMMITS`
|
||||
- Fix incorrect token used during push step
|
||||
This project is not currently in active development, but code contributions are always welcome.
|
||||
|
||||
<a href="https://www.buymeacoffee.com/aormsby" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-green.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>
|
||||
I encourage you to share projects using Fork Sync in the Users file. Open a PR against Users so others can check out your work!
|
||||
|
||||
> [USERS.md](/USERS.md)
|
||||
|
||||
If you would like to see more updates to this project, please consider taking a brief survey to help me understand your needs. Thank you, and happy coding.
|
||||
|
||||
> [Fork Sync - Developer Survey](https://forms.gle/pNGkmDWBidcu3BnPA)
|
||||
|
||||
## Intended Workflow
|
||||
|
||||
This action was made to keep **non-working** branches up to date with a remote repo. However, you can probably use it for active work branches as well if the custom input supports your needs. Here's how it works.
|
||||
This action was made to keep **non-working** branches up to date with a remote repo. However, you should also be able to use it for branches under active development as long as the custom input supports your needs.
|
||||
|
||||
You have a branch on your `target` repo - the one you want to update - and a branch on your `upstream` repo - where the updates are coming from. This action checks out those branches on both repos, checks for any new commits (by hash comparison), and pulls those new commits from upstream. Easy!
|
||||
Configure the action with a branch on your `target` repo - the one you want to update - and a branch on your `upstream` repo - where the updates are coming from. This action checks out those branches on both repos, checks for any new commits (by hash comparison), and pulls those new commits from upstream to the target. Easy!
|
||||
|
||||
<img src="img/fork-sync-diagram.png" alt="sample git workflow">
|
||||
|
||||
As stated, this works best if your target branch is a non-working branch - i.e. you don't make any commits to it. Check out the [wiki](https://github.com/aormsby/Fork-Sync-With-Upstream-action/wiki/Scenarios-for-Advanced-Input) for notes on how to use input vars for specific situations.
|
||||
|
||||
## How to Use
|
||||
|
||||
[Add a workflow](https://docs.github.com/en/actions/quickstart#creating-your-first-workflow) to your repo that includes this action ([sample below](#sample-workflow)). Please note that scheduled workflows only run on the default branch of a repo.
|
||||
|
||||
### Input Variables
|
||||
|
||||
**Note:** For clarity reasons, some variable names have been changed between v2 and v3. Please check your workflows for the correct input.
|
||||
|
||||
#### Core Use
|
||||
|
||||
| Name | Required? | Default | Example |
|
||||
| -------------------------- | :----------------: | ------- | ---------------------------------------- |
|
||||
| target_sync_branch | :white_check_mark: | | 'master', 'main', 'my-branch' |
|
||||
@@ -48,31 +39,9 @@ As stated, this works best if your target branch is a non-working branch - i.e.
|
||||
| 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. ([wiki](https://github.com/aormsby/Fork-Sync-With-Upstream-action/wiki/Configuration#setup-notes))
|
||||
**Always** set `target_repo_token` to `${{ secrets.GITHUB_TOKEN }}` so the action can push to your target repo.
|
||||
|
||||
This action supports syncing from both public and private upstream repos. Store an authentication token in your target repo and use `upstream_repo_access_token: ${{ secrets.NAME_OF_TOKEN }}` as an input var for the action to access your private upstream repo.
|
||||
|
||||
#### Advanced Use (all optional args)
|
||||
|
||||
| Name | Required? | Default | Example |
|
||||
| --------------------------- | :----------------: | --------------------------- | ----------------------------------- |
|
||||
| host_domain | :white_check_mark: | 'github.com' | 'github.com' |
|
||||
| shallow_since | :white_check_mark: | '1 month ago' | '2 days ago', '3 weeks 7 hours ago' |
|
||||
| target_branch_checkout_args | | | '--recurse-submodules' |
|
||||
| git_log_format_args | | '--pretty=oneline' | '--graph --pretty=oneline' |
|
||||
| upstream_pull_args | | | '--ff-only --tags' |
|
||||
| target_branch_push_args | | | '--force' |
|
||||
| git_config_user | | 'GH Action - Upstream Sync' | |
|
||||
| git_config_email | | 'action@github.com' | |
|
||||
| git_config_pull_rebase | | 'false' | |
|
||||
|
||||
`shallow_since` -> Value should match the time between workflow runs to get the history depth required (but no more) for a good check of new commits to sync
|
||||
|
||||
##### Git Config Settings
|
||||
|
||||
Some basic git config settings must be in place to pull and push data during the action. As seen above, these inputs are required and have default values. They are reset when this action step is finished.
|
||||
|
||||
**Set any git config values to `null` to skip their configuration during this action step.**
|
||||
> For more information on optional input variables, advanced configurations, and working with private repos, see [Wiki - Configuration](https://github.com/aormsby/Fork-Sync-With-Upstream-action/wiki/Configuration)
|
||||
|
||||
### Output Variables
|
||||
|
||||
@@ -80,7 +49,7 @@ Some basic git config settings must be in place to pull and push data during the
|
||||
| --------------- | ---------- | --------------------------------------------------------------------------------------------------------------- |
|
||||
| has_new_commits | true/false | Outputs true if new commits were found in the remote repo, false if target repo already has the latest updates. |
|
||||
|
||||
Want more output variables? [Open an issue](https://github.com/aormsby/Fork-Sync-With-Upstream-action/issues) and let me know.
|
||||
If you need more output data, please open an issue to request it.
|
||||
|
||||
## Sample Workflow
|
||||
|
||||
@@ -115,7 +84,7 @@ jobs:
|
||||
# Step 2: run the sync action
|
||||
- name: Sync upstream changes
|
||||
id: sync
|
||||
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4
|
||||
uses: aormsby/Fork-Sync-With-Upstream-action@v3.5
|
||||
with:
|
||||
target_sync_branch: my-branch
|
||||
# REQUIRED 'target_repo_token' exactly like this!
|
||||
|
||||
Reference in New Issue
Block a user