Skip to content

Commit cd0da20

Browse files
Branch fix bug (#532)
1 parent ad19e81 commit cd0da20

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
4242
- name: Check if latest version
4343
id: get_version
44+
env:
45+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4446
run: |
4547
# Get raw version from release branch
4648
RAW_VERSION="${{ github.event.workflow_run.head_branch }}"
@@ -59,6 +61,22 @@ jobs:
5961
VERSION=$(echo "$RAW_VERSION" | sed -E 's/^[vV]\.?//;s/\.$//')
6062
echo "Raw version from release: $RAW_VERSION -> Normalized: $VERSION"
6163
64+
# Step 1: Get release list
65+
echo "Getting release list..."
66+
gh release list --limit 10
67+
68+
# Step 2: Filter out drafts
69+
echo "Filtering drafts..."
70+
gh release list --limit 10 | grep -v Draft
71+
72+
# Step 3: Extract first column
73+
echo "Extracting version tags..."
74+
gh release list --limit 10 | grep -v Draft | awk '{print $1}'
75+
76+
# Step 4: Filter for version pattern
77+
echo "Filtering for version pattern..."
78+
gh release list --limit 10 | grep -v Draft | awk '{print $1}' | grep -E "^[vV]"
79+
6280
# Extract and normalize all version tags - only consider tags starting with v or V
6381
ALL_VERSIONS=$(gh release list --limit 10 | grep -v Draft | awk '{print $1}' | grep -E "^[vV]")
6482
echo "All version tags (filtered to v/V only):"
@@ -86,8 +104,6 @@ jobs:
86104
echo "is_latest=$IS_LATEST" >> "$GITHUB_OUTPUT"
87105
88106
echo "Version: $VERSION (Latest: $LATEST, Is Latest: $IS_LATEST)"
89-
env:
90-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91107
92108
- name: Verify Docker image exists
93109
run: |

0 commit comments

Comments
 (0)