Add SSL certificate generation step for nginx Docker build in CI workflow

- Add conditional step to generate self-signed SSL certificates before building xingrin-nginx image
- Create docker/nginx/ssl directory and generate privkey.pem and fullchain.pem files
- Use OpenSSL to create 365-day RSA 2048-bit certificate with CN=localhost
- Only execute when building nginx image to avoid unnecessary certificate generation
This commit is contained in:
yyhuni
2025-12-12 19:41:59 +08:00
parent baa137d232
commit b1a48edd40

View File

@@ -58,6 +58,16 @@ jobs:
echo "=== After cleanup ==="
df -h
- name: Generate SSL certificates for nginx build
if: matrix.image == 'xingrin-nginx'
run: |
mkdir -p docker/nginx/ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout docker/nginx/ssl/privkey.pem \
-out docker/nginx/ssl/fullchain.pem \
-subj "/CN=localhost"
echo "SSL certificates generated for CI build"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3