Skip to content

Commit f1c19ac

Browse files
chore(ci): Update Go version and release workflows (backport k270) (#19077)
Signed-off-by: Christian Haudum <[email protected]> Co-authored-by: Christian Haudum <[email protected]>
1 parent f50c87f commit f1c19ac

File tree

8 files changed

+52
-52
lines changed

8 files changed

+52
-52
lines changed

.github/jsonnetfile.lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
},
1111
"version": "1dd22f1dbfa671ac40e4a92f1a56bd9821871d44",
12-
"sum": "zWhVb9aJ1waVDKRXC0TqqFKKepNwWe0ilY2STT9Xl5o="
12+
"sum": "/Gk8/aqedF23h3wjwG05d8rJJiTMVWHqfceXDOboJBg="
1313
}
1414
],
1515
"legacyImports": false

.github/vendor/github.com/grafana/loki-release/workflows/validate.libsonnet

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
- "main"
1616
"permissions":
1717
"contents": "read"
18-
"pull-requests": "read"
18+
"pull-requests": "read"

.github/workflows/images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,4 +508,4 @@
508508
"workflow_dispatch": {}
509509
"permissions":
510510
"contents": "read"
511-
"pull-requests": "read"
511+
"pull-requests": "read"

.github/workflows/minor-release-pr.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
--target-branch "$(echo $OUTPUTS_BRANCH | tr -d '"')" \
118118
--token "$(echo $OUTPUTS_TOKEN | tr -d '"')" \
119119
--dry-run ${{ fromJSON(env.DRY_RUN) }}
120-
120+
121121
working-directory: "lib"
122122
dist:
123123
needs:
@@ -235,7 +235,7 @@ jobs:
235235
name: "Parse image platform"
236236
run: |
237237
mkdir -p images
238-
238+
239239
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
240240
echo "platform=${platform}" >> $GITHUB_OUTPUT
241241
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -308,7 +308,7 @@ jobs:
308308
name: "Parse image platform"
309309
run: |
310310
mkdir -p images
311-
311+
312312
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
313313
echo "platform=${platform}" >> $GITHUB_OUTPUT
314314
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -381,7 +381,7 @@ jobs:
381381
name: "Parse image platform"
382382
run: |
383383
mkdir -p images
384-
384+
385385
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
386386
echo "platform=${platform}" >> $GITHUB_OUTPUT
387387
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -460,7 +460,7 @@ jobs:
460460
name: "Parse image platform"
461461
run: |
462462
mkdir -p images
463-
463+
464464
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
465465
echo "platform=${platform}" >> $GITHUB_OUTPUT
466466
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -533,7 +533,7 @@ jobs:
533533
name: "Parse image platform"
534534
run: |
535535
mkdir -p images
536-
536+
537537
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
538538
echo "platform=${platform}" >> $GITHUB_OUTPUT
539539
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -612,7 +612,7 @@ jobs:
612612
name: "Parse image platform"
613613
run: |
614614
mkdir -p images
615-
615+
616616
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
617617
echo "platform=${platform}" >> $GITHUB_OUTPUT
618618
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -691,7 +691,7 @@ jobs:
691691
name: "Parse image platform"
692692
run: |
693693
mkdir -p images
694-
694+
695695
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
696696
echo "platform=${platform}" >> $GITHUB_OUTPUT
697697
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -771,7 +771,7 @@ jobs:
771771
run: |
772772
mkdir -p images
773773
mkdir -p plugins
774-
774+
775775
platform="$(echo "${{ matrix.arch}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
776776
echo "platform=${platform}" >> $GITHUB_OUTPUT
777777
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -863,7 +863,7 @@ jobs:
863863
name: "Parse image platform"
864864
run: |
865865
mkdir -p images
866-
866+
867867
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
868868
echo "platform=${platform}" >> $GITHUB_OUTPUT
869869
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -942,7 +942,7 @@ jobs:
942942
name: "Parse image platform"
943943
run: |
944944
mkdir -p images
945-
945+
946946
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
947947
echo "platform=${platform}" >> $GITHUB_OUTPUT
948948
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -1041,7 +1041,7 @@ jobs:
10411041
name: "get release version"
10421042
run: |
10431043
npm install
1044-
1044+
10451045
if [[ -z "${{ env.RELEASE_AS }}" ]]; then
10461046
npm exec -- release-please release-pr \
10471047
--consider-all-branches \
@@ -1071,16 +1071,16 @@ jobs:
10711071
--token "$OUTPUTS_TOKEN" \
10721072
--release-as "${{ env.RELEASE_AS }}"
10731073
fi
1074-
1074+
10751075
cat release.json
1076-
1077-
if [[ `jq length release.json` -gt 1 ]]; then
1076+
1077+
if [[ `jq length release.json` -gt 1 ]]; then
10781078
echo 'release-please would create more than 1 PR, so cannot determine correct version'
10791079
echo "pr_created=false" >> $GITHUB_OUTPUT
10801080
exit 1
10811081
fi
1082-
1083-
if [[ `jq length release.json` -eq 0 ]]; then
1082+
1083+
if [[ `jq length release.json` -eq 0 ]]; then
10841084
echo "pr_created=false" >> $GITHUB_OUTPUT
10851085
else
10861086
version="$(npm run --silent get-version)"
@@ -1096,4 +1096,4 @@ name: "Prepare Minor Release PR from Weekly"
10961096
- "k[0-9]+"
10971097
permissions:
10981098
contents: "read"
1099-
pull-requests: "read"
1099+
pull-requests: "read"

.github/workflows/patch-release-pr.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
--target-branch "$(echo $OUTPUTS_BRANCH | tr -d '"')" \
118118
--token "$(echo $OUTPUTS_TOKEN | tr -d '"')" \
119119
--dry-run ${{ fromJSON(env.DRY_RUN) }}
120-
120+
121121
working-directory: "lib"
122122
dist:
123123
needs:
@@ -235,7 +235,7 @@ jobs:
235235
name: "Parse image platform"
236236
run: |
237237
mkdir -p images
238-
238+
239239
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
240240
echo "platform=${platform}" >> $GITHUB_OUTPUT
241241
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -308,7 +308,7 @@ jobs:
308308
name: "Parse image platform"
309309
run: |
310310
mkdir -p images
311-
311+
312312
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
313313
echo "platform=${platform}" >> $GITHUB_OUTPUT
314314
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -381,7 +381,7 @@ jobs:
381381
name: "Parse image platform"
382382
run: |
383383
mkdir -p images
384-
384+
385385
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
386386
echo "platform=${platform}" >> $GITHUB_OUTPUT
387387
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -460,7 +460,7 @@ jobs:
460460
name: "Parse image platform"
461461
run: |
462462
mkdir -p images
463-
463+
464464
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
465465
echo "platform=${platform}" >> $GITHUB_OUTPUT
466466
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -533,7 +533,7 @@ jobs:
533533
name: "Parse image platform"
534534
run: |
535535
mkdir -p images
536-
536+
537537
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
538538
echo "platform=${platform}" >> $GITHUB_OUTPUT
539539
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -612,7 +612,7 @@ jobs:
612612
name: "Parse image platform"
613613
run: |
614614
mkdir -p images
615-
615+
616616
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
617617
echo "platform=${platform}" >> $GITHUB_OUTPUT
618618
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -691,7 +691,7 @@ jobs:
691691
name: "Parse image platform"
692692
run: |
693693
mkdir -p images
694-
694+
695695
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
696696
echo "platform=${platform}" >> $GITHUB_OUTPUT
697697
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -771,7 +771,7 @@ jobs:
771771
run: |
772772
mkdir -p images
773773
mkdir -p plugins
774-
774+
775775
platform="$(echo "${{ matrix.arch}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
776776
echo "platform=${platform}" >> $GITHUB_OUTPUT
777777
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -863,7 +863,7 @@ jobs:
863863
name: "Parse image platform"
864864
run: |
865865
mkdir -p images
866-
866+
867867
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
868868
echo "platform=${platform}" >> $GITHUB_OUTPUT
869869
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -942,7 +942,7 @@ jobs:
942942
name: "Parse image platform"
943943
run: |
944944
mkdir -p images
945-
945+
946946
platform="$(echo "${{ matrix.arch }}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
947947
echo "platform=${platform}" >> $GITHUB_OUTPUT
948948
echo "platform_short=$(echo ${{ matrix.arch }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
@@ -1041,7 +1041,7 @@ jobs:
10411041
name: "get release version"
10421042
run: |
10431043
npm install
1044-
1044+
10451045
if [[ -z "${{ env.RELEASE_AS }}" ]]; then
10461046
npm exec -- release-please release-pr \
10471047
--consider-all-branches \
@@ -1071,16 +1071,16 @@ jobs:
10711071
--token "$OUTPUTS_TOKEN" \
10721072
--release-as "${{ env.RELEASE_AS }}"
10731073
fi
1074-
1074+
10751075
cat release.json
1076-
1077-
if [[ `jq length release.json` -gt 1 ]]; then
1076+
1077+
if [[ `jq length release.json` -gt 1 ]]; then
10781078
echo 'release-please would create more than 1 PR, so cannot determine correct version'
10791079
echo "pr_created=false" >> $GITHUB_OUTPUT
10801080
exit 1
10811081
fi
1082-
1083-
if [[ `jq length release.json` -eq 0 ]]; then
1082+
1083+
if [[ `jq length release.json` -eq 0 ]]; then
10841084
echo "pr_created=false" >> $GITHUB_OUTPUT
10851085
else
10861086
version="$(npm run --silent get-version)"
@@ -1096,4 +1096,4 @@ name: "Prepare Patch Release PR"
10961096
- "release-[0-9]+.[0-9]+.x"
10971097
permissions:
10981098
contents: "read"
1099-
pull-requests: "read"
1099+
pull-requests: "read"

.github/workflows/release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
else
103103
echo "exists=true" >> $GITHUB_OUTPUT
104104
fi
105-
105+
106106
if [[ "$isDraft" == "true" ]]; then
107107
echo "draft=true" >> $GITHUB_OUTPUT
108108
fi
@@ -200,44 +200,44 @@ jobs:
200200
run: |
201201
# Debug and clean the version variable
202202
echo "Original VERSION: $VERSION"
203-
203+
204204
# Remove all quotes (both single and double)
205205
VERSION=$(echo $VERSION | tr -d '"' | tr -d "'")
206206
echo "After removing quotes: $VERSION"
207-
207+
208208
# Extract version without the 'v' prefix if it exists
209209
VERSION="${VERSION#v}"
210210
echo "After removing v prefix: $VERSION"
211-
211+
212212
# Extract major and minor versions
213213
MAJOR=$(echo $VERSION | cut -d. -f1)
214214
MINOR=$(echo $VERSION | cut -d. -f2)
215215
echo "MAJOR: $MAJOR, MINOR: $MINOR"
216-
216+
217217
# Create branch name from template
218218
BRANCH_TEMPLATE="release-\${major}.\${minor}.x"
219219
BRANCH_NAME=${BRANCH_TEMPLATE//\$\{major\}/$MAJOR}
220220
BRANCH_NAME=${BRANCH_NAME//\$\{minor\}/$MINOR}
221-
221+
222222
echo "Checking if branch already exists: $BRANCH_NAME"
223-
223+
224224
# Check if branch exists
225225
if git ls-remote --heads origin $BRANCH_NAME | grep -q $BRANCH_NAME; then
226226
echo "Branch $BRANCH_NAME already exists, skipping creation"
227227
echo "branch_exists=true" >> $GITHUB_OUTPUT
228228
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
229229
else
230230
echo "Creating branch: $BRANCH_NAME from tag: $(echo $OUTPUTS_NAME | tr -d '"')"
231-
231+
232232
# Create branch from the tag
233233
git fetch --tags
234234
git checkout "$(echo $OUTPUTS_BRANCH | tr -d '"')"
235235
git checkout -b $BRANCH_NAME
236-
236+
237237
# explicity set the github app token to override the release branch protection
238238
git remote set-url origin "https://x-access-token:$(echo ${OUTPUTS_TOKEN} | tr -d '"')@github.com/${{ env.RELEASE_REPO }}"
239239
git push -u origin $BRANCH_NAME
240-
240+
241241
echo "branch_exists=false" >> $GITHUB_OUTPUT
242242
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
243243
fi
@@ -440,4 +440,4 @@ name: "create release"
440440
- "main"
441441
permissions:
442442
contents: "read"
443-
pull-requests: "read"
443+
pull-requests: "read"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ DOCKER_INTERACTIVE_FLAGS := --tty --interactive
2626
endif
2727

2828
# Ensure you run `make release-workflows` after changing this
29-
GO_VERSION := 1.24.4
29+
GO_VERSION := 1.24.6
3030
# Ensure you run `make IMAGE_TAG=<updated-tag> build-image-push` after changing this
3131
BUILD_IMAGE_TAG := 0.34.6
3232

0 commit comments

Comments
 (0)