-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pin Docker Image Versions in GitHub Actions #1034
Comments
i am not sure i understand this issue. https://hub.docker.com/r/codiumai/pr-agent/tags |
Hi, thank you for your response. My concern is about using tags like To address this, I propose using Docker image digests instead of tags. Digests uniquely identify an image based on its content, ensuring we use the exact same image every time. This enhances the reliability and security of our pipeline. For example, instead of: FROM codiumai/pr-agent:github_action We would use: FROM codiumai/pr-agent@sha256:<digest> This way, we ensure a stable and reproducible environment. |
If you want to work with a stable version (v0.22, v0.23, ..), use the relevant one in your yaml file: https://pr-agent-docs.codium.ai/installation/github/#run-as-a-github-action These versions are fixed. we release a new version once a month. In any case, we don't intend to change our dockerhub release mechanism |
@mrT23 You cannot use the PR Agent stable version by that. As a result, if you specify any version in GitHub Actions, it will be ignored. Users using v0.12 might not expect that the codiumai/pr-agent:github_action running is actually the one updated just two days ago. This problem has already been noted. See #1015 (comment) To solve this, consider the following options:
Second approach ensures the correct version is used, because GitHub Actions will check out the exact source code for the specified tag (like v0.23). |
It's a significant issue that versioning is clearly not working correctly with GitHub Actions. |
ok, we will look into that issue |
try referring to the docker directly instead:
it worked for me, with the correct sha. If it works also for you, you can, and should, open a PR to update the documentation with the new methodology |
Thank you. |
|
opened #1042 |
I've found a way to fix the image digest, and the PR has been merged, so I'll be closing this issue. |
Summary
To enhance the reliability and consistency of CI/CD pipeline, I propose using Docker image digests instead of tags in GitHub Actions.
Details
Currently, the action is using Docker image tags, which can lead to unexpected changes or breaking updates when the tagged image is updated.
By specifying the image digest, we ensure that the exact same image is used every time, providing a more stable and reproducible environment.
Reference: https://github.com/Codium-ai/pr-agent/blob/6135bf1f53f78ba265b5958ac1475f49463fce81/Dockerfile.github_action_dockerhub#L1
The text was updated successfully, but these errors were encountered: