@@ -31,11 +31,11 @@ jobs:
31
31
final_tag="${{ github.event.release.tag_name }}"
32
32
fi
33
33
echo "release_tag=${final_tag}" >> "$GITHUB_OUTPUT"
34
-
34
+
35
35
# Remove 'v' prefix if present for semver validation
36
36
version_without_v="${final_tag#v}"
37
37
echo "version_without_v=${version_without_v}" >> "$GITHUB_OUTPUT"
38
-
38
+
39
39
if [[ "${final_tag}" == *"-alpha."* || "${final_tag}" == *"-next."* ]]; then
40
40
echo "is_alpha_version=true" >> "$GITHUB_OUTPUT"
41
41
echo "is_stable_version=false" >> "$GITHUB_OUTPUT"
47
47
else
48
48
echo "is_stable_version=true" >> "$GITHUB_OUTPUT"
49
49
fi
50
-
50
+
51
51
- name : Parse version with semver
52
52
if : ${{ steps.release.outputs.is_alpha_version == 'false' }}
53
53
id : semver
@@ -95,11 +95,11 @@ jobs:
95
95
# Use parsed version from semver action
96
96
MAJOR_VERSION=$(echo "${PARSED_VERSION}" | jq -r '.major')
97
97
MINOR_VERSION=$(echo "${PARSED_VERSION}" | jq -r '.minor')
98
-
98
+
99
99
# For RC releases, we use major.minor.0 format for the docs folder
100
100
MINOR_VERSION_WITH_PATCH="${MAJOR_VERSION}.${MINOR_VERSION}.0"
101
101
echo "Extracted minor version: ${MINOR_VERSION_WITH_PATCH} from tag: ${RELEASE_TAG}"
102
-
102
+
103
103
# Determine target folder - use version folder for RC releases, main for beta
104
104
if [[ "${RELEASE_TAG}" == *"-rc"* ]]; then
105
105
TARGET_VERSION="${MINOR_VERSION_WITH_PATCH}"
@@ -137,7 +137,7 @@ jobs:
137
137
# generate vcluster partials for target version
138
138
go mod tidy
139
139
go mod vendor
140
-
140
+
141
141
# Determine output path based on target version
142
142
if [[ "${TARGET_VERSION}" == "main" ]]; then
143
143
OUTPUT_PATH="vcluster/_partials/config"
@@ -146,7 +146,7 @@ jobs:
146
146
# Ensure versioned directory exists
147
147
mkdir -p "vcluster_versioned_docs/version-${TARGET_VERSION}"
148
148
fi
149
-
149
+
150
150
go run hack/vcluster/partials/main.go "configsrc/vcluster/${TARGET_VERSION}" "${OUTPUT_PATH}"
151
151
152
152
# set git info
@@ -164,6 +164,8 @@ jobs:
164
164
# create a PR in vcluster-docs with generated partials
165
165
git commit -m "chore: generate vCluster partials for ${TARGET_VERSION} version based on values.schema.json in vCluster ${RELEASE_TAG}"
166
166
git push -u origin -f "${branch_name}"
167
+
168
+ gh pr close "${branch_name}" --comment "Closing to recreate with updated changes from ${RELEASE_TAG}" || true
167
169
gh pr create --fill --head "${branch_name}"
168
170
echo "Create PR in vcluster-docs"
169
171
@@ -203,15 +205,15 @@ jobs:
203
205
# Use parsed version from semver action
204
206
MAJOR_VERSION=$(echo "${PARSED_VERSION}" | jq -r '.major')
205
207
MINOR_VERSION=$(echo "${PARSED_VERSION}" | jq -r '.minor')
206
-
208
+
207
209
# Use the vcluster-vX.Y format for tags
208
210
TARGET_TAG="vcluster-v${MAJOR_VERSION}.${MINOR_VERSION}"
209
-
211
+
210
212
# commit changes
211
213
git commit -m "chore: sync config/*.go and values.schema.json to vCluster version ${RELEASE_TAG}"
212
-
214
+
213
215
# Update the existing tag to point to the new commit
214
216
git tag -f "${TARGET_TAG}"
215
217
git push -u origin -f "${TARGET_TAG}"
216
-
218
+
217
219
echo "vcluster-config tag ${TARGET_TAG} updated to vCluster version ${RELEASE_TAG}"
0 commit comments