mirror of
https://github.com/yyhuni/xingrin.git
synced 2026-01-31 11:46:16 +08:00
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:
10
.github/workflows/docker-build.yml
vendored
10
.github/workflows/docker-build.yml
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user