From 694bf35184c662b74265b2f00a176c074a6826f7 Mon Sep 17 00:00:00 2001 From: Vaishnavi Subhedar - Xilinx <141360387+SubhedarV@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:08:05 -0700 Subject: [PATCH] pushing rpm files using container --- .github/workflows/tarrr_file.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tarrr_file.yml b/.github/workflows/tarrr_file.yml index 7aa822ee091..fb507f12321 100644 --- a/.github/workflows/tarrr_file.yml +++ b/.github/workflows/tarrr_file.yml @@ -105,10 +105,13 @@ jobs: for package_file in *-xrt.rpm; do echo "Pushing package: $package_file" versioned_name="${{ env.XRT_VERSION_PATCH }}-$(basename $package_file)" - docker build -t registry.amd.com/buildops/$versioned_name . + echo "FROM scratch" > Dockerfile + echo "COPY $package_file /" >> Dockerfile + docker build -t registry.amd.com/buildops/$versioned_name -f Dockerfile . docker push registry.amd.com/buildops/$versioned_name done shell: bash + docker-build: needs: [package-download] @@ -138,9 +141,12 @@ jobs: for package_file in $(docker search registry.amd.com/buildops --format "{{.Name}}" | grep "${{ env.XRT_VERSION_PATCH }}-xrt_.*-xrt.rpm"); do echo "Pulling package: $package_file" docker pull $package_file - docker save $package_file -o $(basename $package_file) + container_id=$(docker create $package_file) + docker cp $container_id:/$(basename $package_file) . + docker rm $container_id done shell: bash + - name: List contents of Dockerfile directory run: |