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

Unable to resolve google-github-actions/setup-gcloud@master #451

Closed
humbertowoody opened this issue Dec 22, 2021 · 9 comments
Closed

Unable to resolve google-github-actions/setup-gcloud@master #451

humbertowoody opened this issue Dec 22, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@humbertowoody
Copy link

TL;DR

Hi!

Our pipelines broke because of this change, we assume is just switching from master to main. However, we wanted to ask if this change is final? And why release this change 2 days before Christmas? :(

This broke all our pipelines and really didn't wanted to update everything given the holidays. Perhaps there's an easy fix we can apply instead of revisiting all of them? Thanks in advance!

Expected behavior

To setup the action as normally.

Observed behavior

The branch name has changed from master to main so it can't be loaded.

Action YAML

- name: Set GCP service account
        uses: google-github-actions/setup-gcloud@master
        with:
          service_account_key: ${{ secrets.GCP_SA_KEY }}
          export_default_credentials: true


### Additional information

This change impacts all our workflows (90+), if this change is a must, we can do it, but just to corroborate with you guys that it is indeed the expected approach.
@humbertowoody humbertowoody added the bug Something isn't working label Dec 22, 2021
@sethvargo
Copy link
Member

According to https://github.blog/changelog/2020-07-22-github-actions-better-support-for-alternative-default-branch-names/, the rename should have been a non-breaking change. We'll revert this.

@sethvargo
Copy link
Member

However, we do recommend pinning to @v0 or a specific version.

@fatih
Copy link

fatih commented Dec 22, 2021

This change also just broke our pipeline with the error:

Error: Unable to resolve action `google-github-actions/setup-gcloud@master`, unable to find version `master`

We fixed it by changing the branch to main.

@sethvargo
Copy link
Member

@fatih we just reverted the change back to master to prevent existing workflows from breaking. We recommend pinning to @v0 or a specific tag version, but we also didn't intend to introduce a breaking change with this. GitHub claimed renaming the branch would automatically handle redirects, but that appears to be inaccurate 😦

@sethvargo sethvargo pinned this issue Dec 22, 2021
@sethvargo sethvargo changed the title Unable to resolve action google-github-actions/setup-gcloud@master, unable to find version master Unable to resolve google-github-actions/setup-gcloud@master Dec 22, 2021
@humbertowoody
Copy link
Author

Thank you very much @sethvargo! We'll wait for the revert; we were also aware of redirects and sorry for the inaccurate title.

@sethvargo
Copy link
Member

The revert is done

@sethvargo
Copy link
Member

@humbertowoody the revert is done. I would recommend scheduling time in the new year to either:

  1. Pin to a specific version (@v0.3.0) or a floating pointer (@v0).

  2. Switch to google-github-actions/auth if you're just performing authentication and not actually using the gcloud CLI.

@basit511
Copy link

I have tried everything from the above mentioned comments but still getting this error :
Screenshot 2023-12-28 151441

@sethvargo
Copy link
Member

Hi @basit511 - please open a new issue and complete the bug template that appears.

@google-github-actions google-github-actions locked as resolved and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants