-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
workflows/build-ci-container: Fix container push #125610
base: main
Are you sure you want to change the base?
Conversation
After the changes in 89001d1, the container pushes failed, because it was attempting to push the same container twice. This fixes the sed expression used to push the :latest alias for each container.
@llvm/pr-subscribers-github-workflow Author: Tom Stellard (tstellar) ChangesAfter the changes in 89001d1, the container pushes failed, because it was attempting to push the same container twice. This fixes the sed expression used to push the :latest alias for each container. Full diff: https://github.com/llvm/llvm-project/pull/125610.diff 1 Files Affected:
diff --git a/.github/workflows/build-ci-container.yml b/.github/workflows/build-ci-container.yml
index c419986da79f2b..8272c8f6e266f0 100644
--- a/.github/workflows/build-ci-container.yml
+++ b/.github/workflows/build-ci-container.yml
@@ -96,7 +96,7 @@ jobs:
run: |
function push_container {
image_name=$1
- latest_name=$(echo $image_name | sed 's/:[.0-9]\+$/:latest/g')
+ latest_name=$(echo $image_name | sed 's/:[a-f0-9]\+$/:latest/g')
podman tag $image_name $latest_name
echo "Pushing $image_name ..."
podman push $image_name
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this outside of the PR?
It would be nice if we could figure out a better way to test this. I've definitely caused issues with this before and it's a major detriment that we aren't able to test this before merging. I'll have to see if I can cook something up when I have more time.
I haven't tested this change yet, but I did test the previous change here: https://github.com/tstellar/llvm-project/actions/runs/13066122003/job/36458752114 It didn't fail on my fork though, I think due to some permissions differences. |
Here is the test for this change: https://github.com/tstellar/llvm-project/actions/runs/13126672533/job/36624315056 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the testing, LGTM!
After the changes in 89001d1, the container pushes failed, because it was attempting to push the same container twice. This fixes the sed expression used to push the :latest alias for each container.