From master
to main
The default branch of the repository has been changed to main
. As has the the default value for the branch
parameter.
To keep some backwards compatibility for users who exploit that master
was the default branch
parameter value up to now, this is a last resort fallback value for the branch
parameter, should the main
branch not exist on the remote (in the target GitHub repository).
This fallback implementation also leeds to an intrinsic sanity check for whether or not the specified target branch
exists on the remote (in the target GitHub repository) at all. Should this not be the case, the action will fail immediately.
IMPORTANT: If you are using master
as the default branch for your repository and not defining either of the branch
or ref
parameters, while also having a main
branch in your repository, this action will not work as you expect from this version and onwards. There is an easy fix for this, however; specify the branch
parameter to be master
:
name: Pushing to protected 'master' branch
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
branch: master # This parameter should be explicitly set, to make sure the `master` branch is the target branch.
Again, if you are in the above situation, but do not have a main
branch in your repository, then the action will keep working as it always has. However, it is highly recommended to either change you default branch name to main
or explicitly set either the branch
or ref
parameter.
Changelog
v2.8.0 (2022-01-03)
Implemented enhancements:
Fixed bugs:
Merged pull requests:
- Force update
master
tag #89 (CasperWA) - Fix CI runs for
main
updates #87 (CasperWA) - Finish update to
main
withmaster
tag #85 (CasperWA) - Update dependencies #82 (CasperWA)
- Use
main
as defaultbranch
value instead ofmaster
#81 (CasperWA)
* This Changelog was automatically generated by github_changelog_generator