Corrects the CI workflow to prevent 'manifest unknown' errors.
The `docker/metadata-action` generates a Docker tag with a shortened git SHA, but subsequent `docker run` and `docker pull` commands were attempting to use the full-length SHA, causing the image to not be found.
This fix modifies the `build-and-test` job to expose the generated tags as an output. The test and deployment steps are updated to consume this output, ensuring that the correct, shortened SHA tag is used throughout the workflow.
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
After multiple unsuccessful attempts to dynamically correct the Docker image name, this commit resolves the persistent CI failures by hardcoding the `IMAGE_NAME` environment variable to a valid, lowercase string.
The root cause of the failures was the use of ` ${{ github.repository }}`, which contains uppercase letters, as the Docker image name. This is not allowed by Docker's naming conventions. Previous attempts to fix this with dynamic conversions proved unreliable.
This change ensures that the image name is always valid, which will allow the CI build to pass without any "invalid reference format" or "manifest unknown" errors.
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
The CI build was failing with a "manifest unknown" error because the `docker/metadata-action` was generating a Docker tag with a short Git SHA, while the testing step was trying to pull the image using the full-length SHA.
This commit fixes the issue by configuring the `docker/metadata-action` to use the full-length Git SHA for its tags. This is achieved by adding `sha-len=0` to the `sha` tag type in the workflow file. This ensures that the tag used to build and push the image is the same one used to run the tests, resolving the mismatch.
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
The CI build was failing because the Docker image name, derived from the GitHub repository name, contained uppercase letters, which is not allowed by Docker.
This commit fixes the issue by adding a step to the GitHub Actions workflow to convert the repository name to lowercase before using it as the image name. The corrected lowercase name is then used in all subsequent Docker commands within the `build-and-test` and `deploy-dev` jobs.
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>