This guide provides an overview of the GitHub Actions workflows used in this repository and instructions on how to contribute to the project.
File: .github/workflows/docker-image.yml
Purpose: This workflow builds and pushes Docker images to Docker Hub whenever a new tag starting with v
is pushed to the git repository.
Triggers:
- Push events with git tags matching
v*
.
Jobs:
- build: This job runs on
ubuntu-latest
and performs the following steps:- Checks out the code.
- Sets up Docker Buildx.
- Logs in to Docker Hub using secrets.
- Builds and pushes the Docker image defined in
Dockerfiles/Dockerfile_amazonlinux_2023
to Docker Hub with the tag that was pushed. - Scans the image for vulnerabilities.
File: .github/workflows/tag-latest-image.yml
Purpose: This workflow tags a Docker image as latest
on Docker Hub whenever a latest
git tag is pushed to the repository to the same commit as v.0.* tag.
This creates latest
dockerhub tag to the same tag as of v.0* points to
Triggers:
- Push events with the
latest
tag. - Manual dispatch via the GitHub Actions interface.
Jobs:
- tag-latest: This job runs on
ubuntu-latest
and performs the following steps:- Retrieves the first
v*
tag on the same commit where thelatest
tag is set. - Sets up Docker Buildx.
- Logs in to Docker Hub using secrets.
- Creates a
latest
tag for the Docker image on Docker Hub.
- Retrieves the first
- Fork the Repository: Create a fork of the repository to your GitHub account.
- Clone the Repository: Clone your forked repository to your local machine.
- Create a Branch: Create a new branch for your feature or bug fix.
- Make Changes: Implement your changes in the appropriate files.
- Commit Changes: Commit your changes with a descriptive commit message.
- Push Changes: Push your changes to your forked repository.
- Create a Pull Request: Open a pull request to merge your changes into the main repository.
To trigger the Docker image build and tagging workflows, follow these steps:
-
Push a Version Tag:
- Create and push a tag that starts with
v
(e.g.,v0.0.1
) to trigger the Docker image build workflow. - Example:
git tag v0.0.1 git push origin v0.0.1
- Create and push a tag that starts with
-
Push the Latest Tag:
- After the Docker image build is successful, create and push a
latest
tag to the same commit as thev*
tag to trigger the latest Docker Hub tag creation workflow. - Example:
git tag latest v.0.0.1 git push origin latest -f
- After the Docker image build is successful, create and push a
If you have any questions or need further assistance, please open an issue in the repository.
Thank you for contributing!:w