Migrate to org-level KIWIX_FILE_UPLOAD_SSH_KEY secret - #112
Merged
Conversation
Both upload workflows now read the org-level secret (scoped to this repo) rather than the repo-level copy, so the key can be rotated in one place. Fixes #101. Also repairs the key file path in Upload-KiwixRelease.ps1. In 1d6689d the workflow was changed to write the secret to scripts/upload_ssh_key, but the script still passed scripts/ssh_key to scp, so the release upload could not authenticate. That workflow has had no runs since, so this went unnoticed. The new filename is added to .gitignore: the existing 'ssh_key' pattern matches that basename only, which would have left a private key untracked but visible in the working tree after a local run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the release/nightly upload automation to use a single org-level SSH key secret and aligns the PowerShell release-upload script with the key file path produced by the workflows.
Changes:
- Switch GitHub Actions workflows to read
${{ secrets.KIWIX_FILE_UPLOAD_SSH_KEY }}instead of the repo-level secret. - Fix
Upload-KiwixRelease.ps1to usescripts/upload_ssh_key, matching the workflow-written key file. - Add
upload_ssh_keyto.gitignoreto avoid leaving an untracked private key file in local working trees.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/Upload-KiwixRelease.ps1 | Uses upload_ssh_key for scp authentication and updates header guidance. |
| .gitignore | Ignores upload_ssh_key to prevent accidental local key file visibility/commit risk. |
| .github/workflows/upload_release_assets_to_kiwix.yml | Migrates workflow env to org-level KIWIX_FILE_UPLOAD_SSH_KEY. |
| .github/workflows/build_libzim_wasm.yml | Migrates workflow env to org-level KIWIX_FILE_UPLOAD_SSH_KEY. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Both upload workflows now read the org-level secret (scoped to this repo) rather than the repo-level copy, so the key can be rotated in one place. Fixes #101.
Also repairs the key file path in Upload-KiwixRelease.ps1. In 1d6689d the workflow was changed to write the secret to scripts/upload_ssh_key, but the script still passed scripts/ssh_key to scp, so the release upload could not authenticate. That workflow has had no runs since, so this went unnoticed.
The new filename is added to .gitignore: the existing 'ssh_key' pattern matches that basename only, which would have left a private key untracked but visible in the working tree after a local run.