From 0871f88c508c6def9717cff81211a668e8a1d3eb Mon Sep 17 00:00:00 2001 From: yash-zededa Date: Thu, 31 Oct 2024 16:16:35 +0100 Subject: [PATCH] fix: assets upload to use the correct variable name. Added needs on for the upload job to get the upload url from the create release job. Signed-off-by: yash-zededa (cherry picked from commit a3fbdd9103f0933b0b8db0620f3b2ce94083e497) (cherry picked from commit 248ab873ce94c9a63519868f1d8135448b8aca31) --- .github/workflows/assets.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index 5a6dcd1e3a..b7bc2e742d 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -42,10 +42,12 @@ jobs: }' https://api.github.com/repos/${{ github.repository }}/releases) release_id=$(echo "$response" | jq -r .id) upload_url=$(echo "$response" | jq -r .upload_url | sed -e "s/{?name,label}//") + echo $upload_url echo "release_id=$release_id" >> "$GITHUB_OUTPUT" echo "upload_url=$upload_url" >> "$GITHUB_OUTPUT" build: runs-on: ubuntu-20.04 + needs: create_release strategy: fail-fast: false matrix: @@ -122,11 +124,11 @@ jobs: # Create SHA256 checksum for rootfs.img sha256sum "assets/rootfs.img" | awk '{ print $1 }' > "assets/rootfs.img.sha256" for file in assets/*; do - base_name=$(basename "$asset") + base_name=$(basename "$file") # Add ARCH prefix new_name="${ARCH}.${base_name}" # Rename the file - mv "$asset" "assets/$new_name" + mv "$file" "assets/$new_name" echo "Uploading assets/$new_name as $new_name..." upload_response=$(curl -s -X POST \ -H "Authorization: Bearer $GITHUB_TOKEN" \