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

Suggestion to fix missing GCloud SDK authentication #586

Closed

Conversation

KengoTODA
Copy link
Contributor

Hello 👋

I'm trying to bump up google-github-actions/setup-gcloud to v1, and found that there is one deleted feature that was not deprecated in the v0 README.

Expected Behavior (v0)

v0 authenticates GCloud SDK if GOOGLE_GHA_CREDS_PATH env var is set. google-github-actions/auth sets this env var (I've checked both v1 and v0), so we use these actions like below:

    steps:
    - id: 'auth'
      uses: 'google-github-actions/auth@v1'
      with:
        workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
        service_account: 'my-service-account@my-project.iam.gserviceaccount.com'

    - name: 'Set up Cloud SDK' # ⚠ does not work with v1
      uses: 'google-github-actions/setup-gcloud@v0'

    - run: 'gsutil rsync ...'

Actual Behavior (v1.0.0)

According to the changeset of v1.0.0, v1.0.0 release removed this automatic authentication feature.

I haven't confirmed yet, but we probably need a snippet like below to run authentication manually:

   - run: gcloud --quiet auth activate-service-account "my-service-account@my-project.iam.gserviceaccount.com" --key-file "$GOOGLE_GHA_CREDS_PATH"

Discussion I want to hold here

I hope we can bring this automatic authentication feature back in v1 release. Could you consider it when you have time?

Or if it is necessary to remove this code, I hope we users have enough document in README.md or somewhere, to find how we need to authenticate GCloud SDK.

Thanks for reading my PR! 🙌

Signed-off-by: Kengo TODA <toda_k@henry.jp>
@KengoTODA KengoTODA requested a review from a team as a code owner November 10, 2022 00:55
@KengoTODA KengoTODA deleted the rollback-missing-feat branch November 10, 2022 04:16
@KengoTODA
Copy link
Contributor Author

Thanks for quick reaction! 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant