- Create an account in github and create a new repository
- Create an account in dockerhub
- DockerHub > Settings > Security > Access Tokens > New Access Token
- Give a description eg. give the repository name created to easily identify
- Click Create and leave the page like that we need to use this token in github.
Add the DockerHub username and access Token in Github repository
- In github repository > settings > secrets and variables > actions > New repository secrets
- Name > enter a name, eg: DockerHub_User
- In value > enter username used to login to DockerHub
- Add Secret
- Click New repository secrets
- Add a new secret name, eg: DockerHub_Token
- In value > copy and paste the dockerHub token.
- Add Secret