Skip to content

Commit

Permalink
fix: assets upload to use the correct variable name.
Browse files Browse the repository at this point in the history
Added needs on for the upload job to get the upload url from the create
release job.

Signed-off-by: yash-zededa <[email protected]>
(cherry picked from commit a3fbdd9)
(cherry picked from commit 248ab87)
  • Loading branch information
yash-zededa authored and OhmSpectator committed Nov 20, 2024
1 parent 22a084f commit 0871f88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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" \
Expand Down

0 comments on commit 0871f88

Please sign in to comment.