- Notifications
You must be signed in to change notification settings - Fork 521
Description
On 2022-04-05, the default branch will be renamed from "master" to "main". Your action is currently pinned to "@master". Even though GitHub creates redirects for renamed branches, testing found that this rename breaks existing GitHub Actions workflows that are pinned to the old branch name.
We strongly advise updating your GitHub Action YAML from:
uses: 'google-github-actions/setup-gcloud@master'to:
uses: 'google-github-actions/setup-gcloud@v0'While not recommended, you can still pin to the "master" branch by setting the environment variable "SETUP_GCLOUD_I_UNDERSTAND_USING_MASTER_WILL_BREAK_MY_WORKFLOW_ON_2022_04_05=1". However, on 2022-04-05 when the branch is renamed, all your workflows will begin failing with an obtuse and difficult to diagnose error message.
This error message means your GitHub Action is currently pinned to @master. As noted in the error, you can update your action to pin to @v0 instead. You can also pin to a specific Git SHA or tag.
On April 4th, 2022, we will rename the default branch from "master" to "main". While GitHub will properly configure redirects, our previous testing found that GitHub Actions does not respect this redirect. Instead of leaving users with a confusing error message, we've added this explicit error message.
FAQ
Why is this change necessary?
In order to be as inclusive as possible, all the default branches for our GitHub Actions repositories are named main. The setup-gcloud action predates this change. Having some repos use master and some use main is confusing for users, so we are standardizing on main moving forward.
Couldn't you have issued a warning instead of throwing an error?
We have been printing a warning message since December 29.
Should I pin to @v0?
We recommend pinning to the latest major version. This will ensure you get all new features and bug fixes while minimizing the chances of a breaking change. At this time, the latest major version is v0. If you are concerned about breaking changes or security, you should pin to a specific Git SHA instead.