Skip to content

Migrate to org-level KIWIX_FILE_UPLOAD_SSH_KEY secret - #112

Merged
Jaifroid merged 2 commits into
mainfrom
Migrate-SSH-key-to-org-secret
Aug 6, 2026
Merged

Migrate to org-level KIWIX_FILE_UPLOAD_SSH_KEY secret#112
Jaifroid merged 2 commits into
mainfrom
Migrate-SSH-key-to-org-secret

Conversation

@Jaifroid

@Jaifroid Jaifroid commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

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.

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>
@Jaifroid Jaifroid self-assigned this Aug 6, 2026
@Jaifroid Jaifroid added build Code relating to building or publishing assets task labels Aug 6, 2026
@Jaifroid
Jaifroid requested a lite review from Copilot August 6, 2026 09:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ps1 to use scripts/upload_ssh_key, matching the workflow-written key file.
  • Add upload_ssh_key to .gitignore to 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.

Comment thread scripts/Upload-KiwixRelease.ps1 Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Jaifroid
Jaifroid merged commit 5f74a04 into main Aug 6, 2026
2 checks passed
@Jaifroid
Jaifroid deleted the Migrate-SSH-key-to-org-secret branch August 6, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Code relating to building or publishing assets task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate SSH_KEY to use the org version of the secret

2 participants