-
Notifications
You must be signed in to change notification settings - Fork 59.8k
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
Added needed call of google-github-actions/auth with credentials and changed version of google-github-actions calls #34265
Conversation
…changed version of google-github-actions calls.
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
Automatically generated comment ℹ️This comment is automatically generated and will be overwritten every time changes are committed to this branch. The table contains an overview of files in the Content directory changesYou may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.
fpt: Free, Pro, Team |
@dundejan Thanks so much for opening a PR! I'll get this triaged for review ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "unreadable" versions are required when using external actions that can change the tags pointing deliberately anywhere without the consumer knowing. Comments can be added to demonstrate what was the original tagged versions added:
# Setup gcloud CLI | ||
- uses: google-github-actions/setup-gcloud@1bee7de035d65ec5da40a31f8589e240eba8fde5 | ||
- uses: google-github-actions/setup-gcloud@v2 # or specify different version if available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: google-github-actions/setup-gcloud@v2 # or specify different version if available | |
# uses: google-github-actions/setup-gcloud@v2 | |
- uses: google-github-actions/setup-gcloud@f0990588f1e5b5af6827153b93673613abdc6ec7 # v2.1.1 |
@@ -172,7 +177,7 @@ jobs: | |||
gcloud --quiet auth configure-docker | |||
|
|||
# Get the GKE credentials so we can deploy to the cluster | |||
- uses: google-github-actions/get-gke-credentials@db150f2cc60d1716e61922b832eae71d2a45938f | |||
- uses: google-github-actions/get-gke-credentials@v2 # or specify different version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: google-github-actions/get-gke-credentials@v2 # or specify different version | |
# uses: google-github-actions/get-gke-credentials@v2 | |
- uses: google-github-actions/get-gke-credentials@6051de21ad50fbb1767bc93c11357a49082ad116 # v2.2.1 |
@@ -160,8 +160,13 @@ jobs: | |||
- name: Checkout | |||
uses: {% data reusables.actions.action-checkout %} | |||
|
|||
- name: Authenticate with Google Cloud | |||
uses: google-github-actions/auth@v1 # or specify different version if available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: google-github-actions/auth@v1 # or specify different version if available | |
# uses: google-github-actions/auth@v2 | |
uses: google-github-actions/auth@f112390a2df9932162083945e46d439060d66ec2 # v2.1.4 |
- name: Authenticate with Google Cloud | ||
uses: google-github-actions/auth@v1 # or specify different version if available | ||
with: | ||
credentials_json: ${{ secrets.GKE_SA_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work as demonstrated in previews, needs escaping:
credentials_json: ${{ secrets.GKE_SA_KEY }} | |
credentials_json: {% raw %}${{ secrets.GKE_SA_KEY }}{% endraw %} |
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀 |
@dundejan Thank you for your patience while our team reviewed! ✨ Before we make these changes to the docs, have you Ideally, we would want them to have a chance to dive into this issue before we make any modifications to the docs 💛 |
FYI there's a similar update from Google Cloud staff last month, adding the auth in the starter workflow too: https://github.com/actions/starter-workflows/pull/2478/files#diff-92b5bbe29dbd8d2c6ae67ce2e24b44e8a82f6c5b00702b05e78cdaaf4f269662 It may however need a more systematic approach updating all the google-cloud-* examples throughout the site, though:/ |
This PR has been automatically closed because there has been no response to to our request for more information from the original author. Please reach out if you have the information we requested, or open a new issue to describing your changes. Then we can begin the review process. |
Why:
Based on my own following the tutorial and usage of .github/workflows/main.yml, I found out, that there is needed to call the auth from google-github-actions for the workflow to work properly. Also the noted versions of google-github-actions were not readable, resp. their meaning was not explained and was not obvious.
When I was solving my problem, I started a discussion at community forum here: could not load the default credentials error in deploy action to GKE, where can be seen and explained the problematic part, that leads me to this little modification.