Skip to content
Compare
Choose a tag to compare
@CasperWA CasperWA released this 03 Jan 16:19
· 116 commits to main since this release

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)

Full Changelog

Implemented enhancements:

  • Update this repository's default branch to main #84
  • Change default branch name to match GitHub #80

Fixed bugs:

  • Force pushing tags when updating master #88
  • Problem with CI #86

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator