This repository was created to practice building a basic CI pipeline with GitHub Actions, Gradle, Java and Docker.
Branches created with a name starting with feature- trigger the GitHub Actions feature workflow (see basic-ci-feature-workflow.yml).
- Request a runner with Ubuntu
- Set up Java
- Validate Gradle wrapper
- Build application, run all tests and build scan
- Upload Gradle build reports and attach as artifact to action
- Upload Jacoco test coverage reports and attach as artifact to action
- Create Docker images and upload to DockerHub
- Run Trivy vulnerability scan and fail if critical vulnerabilities detected*
- Upload vulnerability scan results as artifact to action
A new Docker image feature-{name}_v{github.run_number} is created and feature-{name}_latest is overwritten.
Only branches with the feature- prefix are permitted to push to main. Changes to main trigger workflow basic-ci-workflow.yml.
- Request a runner with Ubuntu, set up Java, and validate Gradle wrapper
- Request a runner with Ubuntu
- Set up Java
- Validate Gradle wrapper
- Build application, run all tests and build scan
- Create Docker images and upload to DockerHub
- Create a release on GitHub
- Use content of
latest_release_notes.txtas release notes body
A new Docker image main_v{github.run_number} is created and main_latest is overwritten. Release is named v{github.run_number}.