Merge pull request #134 from element-hq/bbz/fix-dev-build-shas

Correct the SHA used in dev builds to match the commit sha
This commit is contained in:
Ben Banfield-Zanin authored and GitHub committed 2025-01-28 14:13:06 +00:00
commit ea99b2e4c7
2 files changed
+8 -1

No files matched your search

+7 -1
View File
@@ -51,7 +51,13 @@ jobs:
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
scripts/set_chart_version.sh "$GITHUB_REF_NAME"
elif [ "$GITHUB_REF_NAME" != "main" ]; then
version=$(yq '.version' charts/matrix-stack/Chart.yaml | sed "s/-dev/-sha$GITHUB_SHA/")
# https://github.com/orgs/community/discussions/26325
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
actual_pr_head_commit=$(cat $GITHUB_EVENT_PATH | yq --input-format json -r .pull_request.head.sha)
version=$(yq '.version' charts/matrix-stack/Chart.yaml | sed "s/-dev/-sha$actual_pr_head_commit/")
else
version=$(yq '.version' charts/matrix-stack/Chart.yaml | sed "s/-dev/-sha$GITHUB_SHA/")
fi
scripts/set_chart_version.sh "$version"
fi
+1
View File
@@ -0,0 +1 @@
Correct SHA used in dev builds to match the commit sha.