-
-
Notifications
You must be signed in to change notification settings - Fork 8
feat(updater): Add SSH key support and comprehensive authentication validation #134
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cda95c2
fix(updater): Add token validation and git credential configuration
vaind 70aad9b
fix: Escape template expression in error message
vaind 06e4c9b
fix(updater): Remove token syntax echo from validation error message
vaind a3b716f
fix: Improve token validation to detect malformed tokens
vaind 71c67c5
refactor: Use PowerShell for token validation and git config
vaind 7b2af37
feat: Add token scope validation
vaind bd87297
fix: Reintroduce token validity and access checks in the validation p…
vaind e496fa7
fix(updater): Remove token syntax echo from validation error message
vaind 40bfeac
feat: Enhance whitespace detection in token validation
vaind 9e13f1c
fix: Remove debug output for token preview in error handling
vaind 9333c40
feat: Add explicit check for SSH keys in token validation
vaind 62a7a9d
feat: Add SSH key support as alternative to token authentication
vaind 6835015
fix: Allow both api-token and ssh-key together
vaind 009fee2
refactor: Split authentication validation into separate steps
vaind da1a5fd
refactor: Remove manual git credential configuration
vaind 335d3dd
docs: Add changelog entry and update v3 breaking changes
vaind 8e9eef8
docs: Remove commented-out api-token option from changelog
vaind 02e7c4f
fix: Fallback to github.token when api-token is empty
vaind 54163cb
fix: Update updater version to use latest stable release
vaind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,10 +8,17 @@ | |
| - Scripts receive original and new version as arguments | ||
| - Support both bash (`.sh`) and PowerShell (`.ps1`) scripts | ||
| - Enables workflows like updating lock files, running code generators, or modifying configuration files | ||
| - Updater - Add SSH key support and comprehensive authentication validation ([#134](https://github.com/getsentry/github-workflows/pull/134)) | ||
| - Add `ssh-key` input parameter for deploy key authentication | ||
| - Support using both `ssh-key` (for git) and `api-token` (for GitHub API) together | ||
| - Add detailed token validation with actionable error messages | ||
| - Detect common token issues: expiration, whitespace, SSH keys in wrong input, missing scopes | ||
| - Validate SSH key format when provided | ||
|
|
||
| ### Fixes | ||
|
|
||
| - Updater - Fix boolean input handling for `changelog-entry` parameter and add input validation ([#127](https://github.com/getsentry/github-workflows/pull/127)) | ||
| - Updater - Fix cryptic authentication errors with better validation and error messages ([#134](https://github.com/getsentry/github-workflows/pull/134), closes [#128](https://github.com/getsentry/github-workflows/issues/128)) | ||
|
|
||
| ### Dependencies | ||
|
|
||
|
|
@@ -52,7 +59,7 @@ | |
| # If a custom token is used instead, a CI would be triggered on a created PR. | ||
| api-token: ${{ secrets.CI_DEPLOY_KEY }} | ||
|
|
||
| ### After | ||
| ### After (v3.0) | ||
| native: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
@@ -63,6 +70,21 @@ | |
| api-token: ${{ secrets.CI_DEPLOY_KEY }} | ||
| ``` | ||
|
|
||
| **Note**: If you were using SSH deploy keys with the v2 reusable workflow, the v3.0 composite action initially only supported tokens. | ||
| SSH key support was restored in v3.1 ([#134](https://github.com/getsentry/github-workflows/pull/134)). To use SSH keys, update to v3.1+ and use the `ssh-key` input: | ||
|
|
||
| ```yaml | ||
| ### With SSH key (v3.1+) | ||
| native: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: getsentry/github-workflows/[email protected] # or @v3 for latest | ||
| with: | ||
| path: scripts/update-sentry-native-ndk.sh | ||
| name: Native SDK | ||
| ssh-key: ${{ secrets.CI_DEPLOY_KEY }} | ||
| ``` | ||
|
|
||
| To update your existing Danger workflows: | ||
|
|
||
| ```yaml | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.