Closed flxw closed 2 years ago
@flxw
so what I understood is that you want this action to auto create a new pull request if any changes are found instead of pushing it directly right ?
Exactly, I think it would be useful if the changes could be pushed to a separate branch and then have a PR created towards the default branch. This way it is possible to keep customization while still having a "base in sync":
It's possible with other means as I described but I think it could be a useful addition
@flxw thanks for the clarification.
@flxw based on your request i fully redeveloped this action from scrach .
the new version is faster compared to the current stable version and also includes 2 new features.
The new version is still in beta and you can give it a try by chaning the action's source branch to nodejs-fullrework
make sure to set PULL_REQUEST
key to true if you want to push chages as pull request
- name: Running Workflow Sync
uses: varunsridharan/action-github-workflow-sync@main
with:
+ PULL_REQUEST: true
And for the new file copy feature all you need to do is add !
before the =
like below
WORKFLOW_FILES: |
file1yml=file1.yml
file2yml!=file2.yml
in the above config file1.yml
will get overriten every time the action is triggered for that repo. but the file file2
will only be copied once if the file not eixsts.
please do give it a try and provide your feedback.
Is your feature request related to a problem? Please describe. Some of the repos we would like to keep in sync customize the workflows to a small extent. It would be nice to keep the customizability but have a common basis that is up to date.
Describe the solution you'd like It would be cool if the sync could open PRs upon pushing the workflow files to a specified branch
Describe alternatives you've considered Currently, we bypass the problem by having a workflow inside the target repo that creates the PR upon pushes to the "workflow-sync" branch
Does that make sense to you?