-
Notifications
You must be signed in to change notification settings - Fork 9
Add google/auth action #3
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
Conversation
google/auth/action.yml
Outdated
| id: generate-workload-identity-pool-provider-id | ||
| run: | | ||
| HASH=$(echo -n "${GITHUB_REPOSITORY}" | sha256sum | cut -c1-27) | ||
| echo "workload_identity_provider_id=repo-${HASH}" >> "${GITHUB_OUTPUT}" |
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.
A few questions:
- Do we want to support Windows?
- Should the output be exported too?
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.
Do we want to support Windows?
Do we have an existing use case for Windows? If not, I'd rather add it when it becomes necessary.
Otherwise, we slightly increase the complexity for no reason.
Should the output be exported too?
I don't see why one would need the workload identity pool id.
I might be wrong, but I think we should only add it if we already see a reason for it. Otherwise, we can always add it later.
P.S.
Of course, if you already know any of this is needed, I'm happy to add it.
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.
With the latest changes, I actually addressed both points.
- Added outputs to be able to test the output
- Changed the hash-generating script to Python to make it cross-platform compatible.
google/auth/action.yml
Outdated
| HASH=$(echo -n "${GITHUB_REPOSITORY}" | sha256sum | cut -c1-27) | ||
| echo "workload_identity_provider_id=repo-${HASH}" >> "${GITHUB_OUTPUT}" | ||
| shell: bash | ||
| - uses: google-github-actions/auth@v2 |
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.
Do we want to pin versions?
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.
v1v
left a comment
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.
OTOH, do you think we should add some kind of tests?
I'll ping you in an internal github issue
v1v
left a comment
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.
LGTM, I like the approach for testing the action! 💯
* upstream/main: Add google/auth action (elastic#3)
Adds the
google/authaction — an opinionated action to authenticate with the elastic-observability GCP project.