Skip to content

Commit d45bf54

Browse files
authored
Merge branch 'main' into al/category-specific-fields
2 parents f40bcdc + 759a10d commit d45bf54

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/main.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
4747
echo -n "${GITHUB_REF#refs/tags/}-x64" > ./container_release
4848
# Replace the version in backend/build.rs
49-
sed -i "s/main/$TAG/" backend/build.rs
49+
sed -i "s/SH_VERSION=main/SH_VERSION=${GITHUB_REF#refs/tags/}/" backend/build.rs
5050
else
5151
echo -n "main-$(git rev-parse --short HEAD)-x64" > ./container_release
5252
fi
@@ -92,12 +92,14 @@ jobs:
9292
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
9393
echo -n "${GITHUB_REF#refs/tags/}-arm64" > ./container_release
9494
# Replace the version in backend/build.rs
95-
sed -i "s/main/$TAG/" backend/build.rs
95+
sed -i "s/SH_VERSION=main/SH_VERSION=${GITHUB_REF#refs/tags/}/" backend/build.rs
9696
else
9797
echo -n "main-$(git rev-parse --short HEAD)-arm64" > ./container_release
9898
fi
99+
99100
# Export value to Github variables
100101
echo "TAG=$(cat ./container_release)" >> $GITHUB_ENV
102+
101103
# Set the commit short hash (from the GitHub action variables) in the backend/build.rs
102104
sed -i "s/current/$GITHUB_SHA/" backend/build.rs
103105

0 commit comments

Comments
 (0)