“运行 google-github-actions/setup-gcloud@master” 上的 Github 操作错误。如何解决这个问题?

Jai*_*hah 1 github github-actions

我正在使用 Github actions 将我的应用程序部署到 Google 云,它给了我以下错误 -

Run google-github-actions/setup-gcloud@master
Warning: google-github-actions/setup-gcloud is pinned at "master". We strongly advise against pinning to "@master" as it may be unstable. Please update your GitHub Action YAML from:

    uses: 'google-github-actions/setup-gcloud@master'

to:

    uses: 'google-github-actions/setup-gcloud@v0'

Alternatively, you can pin to any git tag or git SHA in the repository.
Error: 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.
Run Code Online (Sandbox Code Playgroud)

sim*_*arg 6

该第 3 方行动正在偏离使用名为 的分支的惯例master

代替:

uses: google-github-actions/setup-gcloud@master
Run Code Online (Sandbox Code Playgroud)

将 YAML 中的引用更改为:

uses: google-github-actions/setup-gcloud@v0
Run Code Online (Sandbox Code Playgroud)