Add step to trust home CA for improved security in Docker builds
This commit is contained in:
1 parent
cf9fed749b
commit
a7fb530061
1 file changed
+13
@@ -21,7 +21,20 @@ jobs:
|
||||
REPO: ${{ gitea.repository }}
|
||||
SHA: ${{ gitea.sha }}
|
||||
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
|
||||
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
|
||||
# the CLI and buildx from Docker's apt repo; the daemon is the runner's.
|
||||
|
||||
Reference in new issue
Block a user