mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-27 04:07:05 +00:00
🏷️ fix: Harden Helm Chart Tag Parsing (#13123)
This commit is contained in:
parent
050b7fd43a
commit
5f7092e029
1 changed files with 9 additions and 2 deletions
11
.github/workflows/helmcharts.yml
vendored
11
.github/workflows/helmcharts.yml
vendored
|
|
@ -37,8 +37,15 @@ jobs:
|
|||
|
||||
- name: Get Chart Version
|
||||
id: chart-version
|
||||
env:
|
||||
REF_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
CHART_VERSION=$(echo "${{ github.ref_name }}" | cut -d'-' -f2)
|
||||
CHART_VERSION="${REF_NAME#chart-}"
|
||||
SEMVER_REGEX='^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$'
|
||||
if [[ ! "$CHART_VERSION" =~ $SEMVER_REGEX ]]; then
|
||||
echo "Invalid chart version: $CHART_VERSION" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "CHART_VERSION=${CHART_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Log in to GitHub Container Registry
|
||||
|
|
@ -72,4 +79,4 @@ jobs:
|
|||
path: helm/librechat-rag-api
|
||||
registry: ghcr.io
|
||||
registry_username: ${{ github.actor }}
|
||||
registry_password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry_password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue