Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tstellar
Copy link
Collaborator

@tstellar tstellar commented Feb 4, 2025

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.

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.
@llvmbot
Copy link
Member

llvmbot commented Feb 4, 2025

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/125610.diff

1 Files Affected:

  • (modified) .github/workflows/build-ci-container.yml (+1-1)
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

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a 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.

@tstellar
Copy link
Collaborator Author

tstellar commented Feb 4, 2025

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.

@tstellar
Copy link
Collaborator Author

tstellar commented Feb 4, 2025

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants