CI / CD
The build and deployment of thb-cc/app is handled by the deploy workflow using GitHub actions.
The following major steps are performed by the workflow:
- Test and package the application using the
Maven Temurin 21 JDK - Build the container image using Buildx
- Perform a security scan on the image using Trivy
- Push the image to DockerHub
- Sign the image with the digest of the push task using Cosign
- Transfer the most recent compose file to the EC2 instance using SCP
- Deploy the new image to the EC2 instance via SSH by:
- Verifying the integrity of the image with Cosign
- Saving the full image name in a
.envfile on-server in the working directory - Performing a restart with
docker compose