Skip to content

Commit 3feeb93

Browse files
feat: skip hash check error when installing pre-release
1 parent 1fc8046 commit 3feeb93

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ runs:
104104
# Detect version type (priority: latest > version number > branch/rev prefixes)
105105
if [ "$RUNNER_VERSION" = "latest" ]; then
106106
VERSION_TYPE="latest"
107+
elif echo "$RUNNER_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+-'; then
108+
VERSION_TYPE="prerelease"
107109
elif echo "$RUNNER_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+'; then
108110
VERSION_TYPE="release"
109111
elif echo "$RUNNER_VERSION" | grep -q '^branch:'; then
@@ -161,6 +163,12 @@ runs:
161163
echo "::warning::Hash verification is not available when using 'latest' version. Consider pinning a specific version for supply chain security."
162164
fi
163165
curl -fsSL https://codspeed.io/install.sh | bash -s -- --quiet
166+
elif [ "$VERSION_TYPE" = "prerelease" ]; then
167+
# Prereleases are not pinned, so install from the versioned installer without hash verification.
168+
if [ "$SKIP_HASH_CHECK_WARNING" != "true" ]; then
169+
echo "::warning::Hash verification is not available for prerelease version $RUNNER_VERSION."
170+
fi
171+
curl -fsSL "https://codspeed.io/v$RUNNER_VERSION/install.sh" | bash -s -- --quiet
164172
elif [ "$VERSION_TYPE" = "branch" ]; then
165173
# Install from specific branch using cargo
166174
if [ "$SKIP_HASH_CHECK_WARNING" != "true" ]; then

0 commit comments

Comments
 (0)