Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update publishing.md #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update publishing.md #50

wants to merge 1 commit into from

Conversation

mhusinsky
Copy link
Contributor

the action should probably be executed on main branch, as it is called 'main' above in the push-rules as well. also the text below mentiones the 'main' branch instead of master

the action should probably be executed on main branch, as it is called 'main' above as well - right?
@joreg
Copy link
Member

joreg commented Oct 20, 2024

@sebescudie is that something i could ask you to doublecheck? and then also adapt in the publishvl action?

since checkout@master is in use ever since and works, it's probably not entirely wrong. i assume they changed branch from master to main at some point and using @main is probably recommended nowadays?

@mhusinsky
Copy link
Contributor Author

some context:
a blank git repo created on github will have a main branch per default, whereas a git repo created with GitExtensions will default to master. so if you first create your repo locally with GitExtensions and then push it to an empty repo on github, you will end up with both branches on github.

@sebescudie
Copy link
Contributor

sebescudie commented Oct 21, 2024

Hey,

The line actions/checkout@master indicates that the workflow should checkout the actions/checkout action at its master branch. The purpose of this action is to.. checkout a repository (see https://github.com/actions/checkout). So this does not indicate that it should check your repo at the master branch, but rather pick whatever state of the main branch of the action is currently there. As the documentation states, if you want the action to checkout your repo to a specific branch, you should use the ref parameter (see Usage on the previous link).

I guess the script says master because back then I copied and pasted the usage instructions that were there. Even though the branch is now called main I guess GitHub picks the default branch anyway to not break existing workflows that were setup before the branch renaming.

It looks like their README now recommends using the version syntax, like actions/checkout@v4. I will try that on my test repo to see if that behaves the same and will update the instructions if it does.

Edit but agreed, even if we don't want to specify a version for whatever reason, we should stick to main, if that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants