You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then later, I realized I can't use workflow-templates unless I switch to GitHub Enterprise Cloud. Which I'm not ready to do (yet).
And I only have private repos in my organization.
Then I found this project, and figured this would solve my immediate problem of copying workflow files to target repositories whenever a change is pushed.
Problem: The target repositories use a mix of master and main as default branch. And I cannot change that yet.
Describe the solution you'd like
Have action-github-workflow-sync replace $default-branch with the default branch name of the repository that the workflow file is being copied to. This way, I keep workflow-templates which is starter workflow friendly for the day I switch to Enterprise Cloud (which could be never), and yet the sync creates a workflow file that contains the correct default branch name on my behalf.
There is then only one source of truth for the workflows...
Describe alternatives you've considered
I've considered reusable workflows, but it is not possible to call a reusable workflow in a private repository from a workflow in another private repository.
Additional context
Organizations dealing only with private repositories are not well served by default when it comes to keeping workflows DRY. Making this change could help improve the situation.
The text was updated successfully, but these errors were encountered:
lestephane
changed the title
add support for $default-branch placeholder expansion (to copy workflows from org/.github/workflow-templates)
add support for $default-branch placeholder expansion (to copy workflows from <ORG>/.github/workflow-templates)
Jul 20, 2022
What i understood from your solution is that you want this action to auto find & replace $default-branch text inside the copied workflow file and update it with the proper branch name of the target repository
Is your feature request related to a problem? Please describe.
I started my journey towards workflow sharing with starter workflows at https://docs.github.com/en/actions/using-workflows/creating-starter-workflows-for-your-organization, by creating files in the org
.github
repo'sworkflow-templates
sub-directorywith the$default-branch
placeholder.Then later, I realized I can't use
workflow-templates
unless I switch to GitHub Enterprise Cloud. Which I'm not ready to do (yet).And I only have private repos in my organization.
Then I found this project, and figured this would solve my immediate problem of copying workflow files to target repositories whenever a change is pushed.
Problem: The target repositories use a mix of
master
andmain
as default branch. And I cannot change that yet.Describe the solution you'd like
Have
action-github-workflow-sync
replace$default-branch
with the default branch name of the repository that the workflow file is being copied to. This way, I keepworkflow-templates
which is starter workflow friendly for the day I switch to Enterprise Cloud (which could be never), and yet the sync creates a workflow file that contains the correct default branch name on my behalf.There is then only one source of truth for the workflows...
Describe alternatives you've considered
I've considered reusable workflows, but it is not possible to call a reusable workflow in a private repository from a workflow in another private repository.
Additional context
Organizations dealing only with private repositories are not well served by default when it comes to keeping workflows DRY. Making this change could help improve the situation.
The text was updated successfully, but these errors were encountered: