-
Notifications
You must be signed in to change notification settings - Fork 123
SRE-904: Split token minting from the release run #9192
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 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d3df2e5
SRE-904: Split token minting from the release run
claude 4ba42f9
SRE-904: Trim workflow comments
claude f720252
SRE-904: Keep sccache in the release job
claude 3793a0f
SRE-904: Hand sccache credentials across the job boundary
claude ea02e86
SRE-904: Name the handoff by content and bundle credentials as JSON
claude 466cde0
SRE-904: Make the encrypted handoff the only sccache route
claude 3f45a44
SRE-904: Say what the encrypted values contain
claude 4191fe7
Merge branch 'main' into sre-904/release-oidc-split
claude a7af6d6
Merge branch 'main' into sre-904/release-oidc-split
claude e05bfd2
SRE-904: Use the shared secret-handoff actions from hashintel/.github
claude 795b132
SRE-904: Keep the release publishable when the sccache mint fails
claude 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
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
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 |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Mint sccache credentials | ||
| description: Fetches the sccache R2 credentials from Vault and encrypts them for a job-boundary handoff. | ||
| inputs: | ||
| vault_address: | ||
| description: The URL of the Vault server holding `ci/sccache/r2`. | ||
| required: true | ||
| cf_access_client_id: | ||
| description: Cloudflare Access service-token client ID for that Vault. | ||
| required: true | ||
| cf_access_client_secret: | ||
| description: Cloudflare Access service-token client secret for that Vault. Empty on fork pull requests, which is what skips the fetch there. | ||
| default: "" | ||
| encryption_key: | ||
| description: The symmetric key encrypting the credential bundle. | ||
| default: "" | ||
| outputs: | ||
| encrypted_credentials: | ||
| description: The encrypted credential bundle, JSON with named keys. Empty when the fetch was skipped or failed. | ||
| value: ${{ steps.encrypt.outputs.encrypted_value }} | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Retrieve secrets | ||
| id: secrets | ||
| if: ${{ inputs.cf_access_client_secret != '' }} | ||
| continue-on-error: true | ||
| uses: hashicorp/vault-action@4c06c5ccf5c0761b6029f56cfb1dcf5565918a3b # v3.4.0 | ||
| with: | ||
| url: ${{ inputs.vault_address }} | ||
| method: jwt | ||
| role: ci-hash-sccache | ||
| extraHeaders: | | ||
| CF-Access-Client-Id: ${{ inputs.cf_access_client_id }} | ||
| CF-Access-Client-Secret: ${{ inputs.cf_access_client_secret }} | ||
| secrets: | | ||
| ci/data/sccache/r2 account_id | SCCACHE_ACCOUNT_ID ; | ||
| ci/data/sccache/r2 bucket | SCCACHE_BUCKET ; | ||
| ci/data/sccache/r2 access_key_id | SCCACHE_AWS_ACCESS_KEY_ID ; | ||
| ci/data/sccache/r2 secret_access_key | SCCACHE_AWS_SECRET_ACCESS_KEY ; | ||
|
|
||
| - name: Bundle credentials | ||
| id: bundle | ||
| if: ${{ steps.secrets.outcome == 'success' }} | ||
| shell: bash | ||
| run: | | ||
| credentials=$(jq --null-input --compact-output \ | ||
| --arg account_id "${SCCACHE_ACCOUNT_ID:?}" \ | ||
| --arg bucket "${SCCACHE_BUCKET:?}" \ | ||
| --arg access_key_id "${SCCACHE_AWS_ACCESS_KEY_ID:?}" \ | ||
| --arg secret_access_key "${SCCACHE_AWS_SECRET_ACCESS_KEY:?}" \ | ||
| '$ARGS.named') | ||
| echo "credentials=${credentials}" >>"${GITHUB_OUTPUT}" | ||
|
|
||
| - name: Encrypt credentials | ||
| id: encrypt | ||
| if: ${{ steps.secrets.outcome == 'success' }} | ||
| uses: hashintel/.github/.github/actions/encrypt-secret@583b0468f2033c884bc82281e8f9c48edf1daeb7 # main | ||
| with: | ||
| value: ${{ steps.bundle.outputs.credentials }} | ||
| encryption_key: ${{ inputs.encryption_key }} |
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
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.
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.