I'm following the testdriven.io course Test-Driven Development with FastAPI and Docker
I'm at the end of the Continuous integration chapter, I just pushed a pull request with all the GitHub actions, and it fails.
My errors from GitHub actions:
Here are my settings for a personal access token:
I tried different things to make it work from extending the access token scopes to replacing docker.pkg.github.com with ghcr.io as mentioned by Github, without success.
My personal solution
I managed to solve the problem, but I am unfamiliar with DevOps, CI/CD, GithHub actions, and Docker registries. Therefore, everything that follows should be treated cautiously.
Add a new step to the build jobs:
After the "GitHub to login packages" step in the .github/workflows/main.yml, add this step:
Create a repository secret DOCKER_TOKEN, and paste your docker token.
Optionally:
actions/checkout@v3 and docker/login-action@v1 to
docker/login-action@v2 in the .github/workflows/main.yml file