[llvm] [GitHub][CI] Factor out duplicate container building code into composite actions (PR #166663)

Baranov Victor via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 6 11:29:20 PST 2025


================
@@ -0,0 +1,44 @@
+name: Push Container
+description: >-
+  Download all container artifacts for this job and push them to the GitHub registry.
+
+inputs:
+  token:
+    description: >-
+      Token to use to authenticate with the container registry.
+    required: true
+
+runs:
+  using: "composite"
+  steps:
+    - name: Download container
+      uses: actions/download-artifact at 634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
+
+    - name: Push Container
+      env:
+        GITHUB_TOKEN: ${{ inputs.token }}
+      shell: bash
+      run: |
+        function push_container {
+          image_name=$1
+          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
+          echo "Pushing $latest_name ..."
+          podman push $latest_name
+        }
+
+        podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
+        for f in $(find . -iname '*.tar'); do
----------------
vbvictor wrote:

Ok! Resolving

https://github.com/llvm/llvm-project/pull/166663


More information about the llvm-commits mailing list