Add step to trust home CA for improved security in Docker builds

This commit is contained in:
David Dyer committed 2026-10-25 19:09:34 -04:00
1 parent cf9fed749b
commit a7fb530061
1 file changed
+13
+13
View File
@@ -21,7 +21,20 @@ jobs:
REPO: ${{ gitea.repository }} REPO: ${{ gitea.repository }}
SHA: ${{ gitea.sha }} SHA: ${{ gitea.sha }}
steps: steps:
# Trust the home CA when one is configured: instance variable HOME_CA
# holds the root cert as PEM. Leave it unset on hosts with a public
# cert (the VPS) and this step is skipped.
- name: Trust home CA
if: ${{ vars.HOME_CA != '' }}
env:
HOME_CA: ${{ vars.HOME_CA }}
run: |
printf '%s\n' "$HOME_CA" > /usr/local/share/ca-certificates/home-ca.crt
update-ca-certificates
- uses: actions/checkout@v4 - uses: actions/checkout@v4
env:
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt
# node:24-trixie (Debian 13) has git and node but no Docker CLI. Install # node:24-trixie (Debian 13) has git and node but no Docker CLI. Install
# the CLI and buildx from Docker's apt repo; the daemon is the runner's. # the CLI and buildx from Docker's apt repo; the daemon is the runner's.