Building your container image with GitHub Actions
To build and push your image with GitHub Actions, you should follow the given steps:
- Fork the https://github.com/sergioarmgpl/fluxappdemo repository. This is going to create a repository named
https://github.com/<GITHUB_USER>/fluxappdemo
.
GITHUB_USER
is the username of your GitHub account. Replace it with your own username.
- Create
DOCKERHUB_USERNAME
andDOCKERHUB_TOKEN
secrets for your repository. These will be created as encrypted secrets for a repository. To create the secrets, open the following page in the browser:https://github.com/<GITHUB_USER>/fluxappdemo/settings/secrets/actions
.
After adding the variables, your repository will look like this:
Figure 7.8 – GitHub repository secrets
- Modify the
.github/workflows/github-actions-fluxappdemo.yml
file in the last line in thetags
section with your user. It will look like this:tags: <DOCKER_USER>...