This project is inspired by the instructions found in the Azure documentation. Make sure to follow the steps under Prerequisites to be able to use this repository.
Pushing the container images to a container registry (like GitHub Container Package or Docker Hub) requires logging in first. For the login, a username and a password (or a personal access token (PAT) in case of GitHub Container Package) is required, in addition to the hostname of the registry (see guide in GitHub Docs for examples).
To generate the personal acccess token for GitHub, go to your account settings and open Developer settings → Personal access tokens. Click on Generate new token and generate a new token.
Note
|
Store the generated token in a safe place! After closing the page where the token is displayed, it can not be retrieved anymore. Also make sure that nobody else can access the token! |
The credentials and the hostname for the container registry are stored in GitHub secrets. To create the secrets, go to Settings in your repository where the workflow will be executed and select Secrets. Add the following repository secets:
Name |
Value |
CONTAINER_REGISTRY_HOSTNAME |
Hostname; Example: ghcr.io |
CONTAINER_REGISTRY_TOKEN |
Password or Personal acccess token (PAT) |
CONTAINER_REGISTRY_USERNAME |
Your username |