For now I have to do
branches:
- master
Is it possible to have kind of default, like
branches: default
That would be great, as master
no longer is that obvious. Any ideas?
For now I have to do
branches:
- master
Is it possible to have kind of default, like
branches: default
That would be great, as master
no longer is that obvious. Any ideas?
I donāt have a solution; but, I do have a perspective. Iāve gotten bogged down trying to use GitHub Actions as if it were a normal programming language, where I can do most anything I want.
It seems like you want to make a generic workflow file that could handle any repo with a default branch named anything. Or one where the default branch to be changed ⦠maybe often.
But isnāt it more likely that your repo will have one default branch that remains unchanged forever or at least almost forever. In that case, you would set the branch name once and probably never change it again.
@bsa-coder yeah, problem is with this new world, where one country forces entire world to change their understanding of words and forces āmainā over āmasterā.
So now I have a bunch of repos with āmasterā and all the new once come with āmainā. And even though I do not understand why āmasterā is evil, I want to respect others and if I get repo with āmainā I want to keep it and not change to āmasterā.
Now, I have workflows that are the same in all repositories, like -> https://github.com/asyncapi/.github/blob/615fa9d44aafc55e0698d45d0c070eeb4d2929ab/.github/workflows/automerge.yml. When I want to make changes to it, I do not make commits/prs/merge to 37 other repos, but just make a change to this single file and replicate the change with my custom action https://github.com/derberg/global-workflows-support.
The problem I have now, is that I cannot have global workflows that react on commit to default branch.
Does it make sense?
It never occurred to me that āmasterā was evil ⦠oh well.
If the problem is just that āmainā has replaced āmasterā on new repos and assuming that āmasterā will be gone for the future, then change your YML to
branches: [main, master]
Then youāll get the same results. Old āmasterā repos will get triggered and use your new-improved YML and new āmainā repos will also.
@bsa-coder yeah this is the only workaround that eventually I will apply. Thing is that it is just a workaround. I always take into account that I run away from project at some point of time and then such workarounds are unknown until they make something fail thus why I created this thread hoping core maintainers might notice and pull to the roadmap
I agree ⦠after all Git allows you to set the default so why wouldnāt they allow you to use it in Actions. It seems simple enough.