- Clone this project and copy it to your personal project.
- Based on your needs, delete unused pipelines and retain the necessary ones.
- Customize the
.github/workflows
andDockerfile
.
This repository contains a GitHub Actions workflow template that automates the process of building different projects (refer to the folders) and pushing the resulting Docker images to Docker Hub. This setup is ideal for continuous integration and deployment (CI/CD) pipelines, ensuring that every change to your codebase is automatically tested, built, and made available as a Docker image.
Before using this workflow, ensure you have the following:
- A GitHub account and a repository with a Spring Boot project.
- A Docker Hub account and a repository where images will be pushed.
- Project-specific setup and knowledge.
-
GitHub Secrets:
-
Workflow File:
- The workflow is defined in
.github/workflows
. View Workflow - Customize the workflow according to your project's needs, especially the
context
,file
, andtags
fields under theBuild and Push
job.
- The workflow is defined in
-
Dockerfile:
- Manual Trigger: By default, trigger the workflow manually from the GitHub Actions tab in your repository.
- Automatic Trigger: Uncomment the below code in
.github/workflows
to make the workflow run automatically upon pushing code to the configured branch (default ismain
).
# push:
# branches: [main]