Skip to content

Commit 2707785

Browse files
committed
Fix naming
1 parent 5da78a6 commit 2707785

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ jobs:
3535
- uses: actions/checkout@v4
3636

3737
- name: Build Firecracker ${{ matrix.version }}
38-
run: ./build.sh "${{ matrix.version }}"
38+
id: build
39+
run: |
40+
./build.sh "${{ matrix.version }}"
41+
# Read the computed version name (with hash)
42+
version_name=$(cat built_versions.txt | tail -1)
43+
echo "version_name=$version_name" >> $GITHUB_OUTPUT
3944
4045
- name: Upload build artifact
4146
uses: actions/upload-artifact@v4
4247
with:
43-
name: firecracker-${{ matrix.version }}
48+
name: firecracker-${{ steps.build.outputs.version_name }}
4449
path: builds/
4550
retention-days: 7

build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ function build_version {
4949
echo "Copying finished build to builds directory"
5050
mkdir -p "../builds/${version_name}"
5151
cp build/cargo_target/x86_64-unknown-linux-musl/release/firecracker "../builds/${version_name}/firecracker"
52+
53+
# Write version name to file for CI to use
54+
echo "$version_name" >> ../built_versions.txt
5255
}
5356

5457
# If a version is passed as argument, build only that version

0 commit comments

Comments
 (0)