Keep the deploy key out of the printed CI script
Build and Deploy Next App / quality (push) Successful in 1m16s
Build and Deploy Next App / convex-deploy (push) Successful in 52s
Build and Deploy Next App / build-next (push) Successful in 4m6s

The deploy step put ${{ secrets.DEPLOY_SSH_KEY }} straight into the run script. The runner prints that script, and Gitea does not mask a multi-line secret once it is split across script lines, so the key body appeared in every deploy log. The key now arrives through the step's env block.
This commit is contained in:
Gabriel Brown committed 2026-10-01 15:15:16 -04:00
1 parent 2d4f5b23b5
commit d7d18e111d
1 file changed
+6 -1
+6 -1
View File
@@ -119,9 +119,14 @@ jobs:
# failure only warns: the image is pushed and the midnight
# podman-update.timer deploys it anyway.
- name: Trigger immediate deploy
# The key comes in through env, not ${{ secrets.* }} in the script:
# the runner prints the script, and Gitea does not mask a multi-line
# secret once it is split across script lines.
env:
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
run: |
install -m600 /dev/null "$HOME/.deploy_key"
printf '%s\n' "${{ secrets.DEPLOY_SSH_KEY }}" > "$HOME/.deploy_key"
printf '%s\n' "$DEPLOY_SSH_KEY" > "$HOME/.deploy_key"
ssh -i "$HOME/.deploy_key" \
-o BatchMode=yes \
-o StrictHostKeyChecking=accept-new \