diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24f4a53..ab4dba9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,35 +17,35 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - - name: Pull, Save, and Compress Docker Images - run: | - images="${{ github.event.inputs.docker_images }}" - platform="${{ github.event.inputs.platform }}" - IFS=',' read -r -a image_array <<< "$images" - for image in "${image_array[@]}"; do - echo "Pulling $image for platform $platform" - docker pull --platform "$platform" "$image" - image_name="${image//\//_}_${platform}" - docker save "$image" -o "${image_name}.tar" - tar -czf "${image_name}.tar.gz" "${image_name}.tar" - rm -f "${image_name}.tar" - - # Save image information to environment file - echo "${image}_IMAGE_PATH=${{ runner.temp }}/${image_name}.tar.gz" >> $GITHUB_ENV - done + - name: Pull, Save, and Compress Docker Images + run: | + images="${{ github.event.inputs.docker_images }}" + platform="${{ github.event.inputs.platform }}" + IFS=',' read -r -a image_array <<< "$images" + for image in "${image_array[@]}"; do + echo "Pulling $image for platform $platform" + docker pull --platform "$platform" "$image" + image_name="${image//\//_}_${platform}" + docker save "$image" -o "${image_name}.tar" + tar -czf "${image_name}.tar.gz" "${image_name}.tar" + rm -f "${image_name}.tar" + + # Save image path to environment file + echo "${image}_IMAGE_PATH=${{ runner.temp }}/${image_name}.tar.gz" >> $GITHUB_ENV + done - - name: Clean up intermediate files - run: | - rm -f *.tar + - name: Clean up intermediate files + run: | + rm -f *.tar - - name: Upload artifacts - uses: actions/upload-artifact@v2 - with: - name: docker-images-tar - path: '*.tar.gz' + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: docker-images-tar + path: '*.tar.gz'