ci: make dist job run on self-hosted runner (#19681)

This commit is contained in:
Trevor Whitney
2025-11-03 15:25:23 -07:00
committed by GitHub
parent c592041578
commit be55edc429
10 changed files with 31 additions and 28 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
"subdir": "workflows"
}
},
"version": "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"version": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
}
],
"legacyImports": true
+2 -2
View File
@@ -8,8 +8,8 @@
"subdir": "workflows"
}
},
"version": "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b",
"sum": "ACCaz08ZDOseRnR1zC8qwcZ4q7QkhtnwjEuXKlrI5dM="
"version": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f",
"sum": "LfNl0q+23sWMu/zwsqHfbUuEfYZMNN2xpZBRizUUHHY="
}
],
"legacyImports": false
+2
View File
@@ -46,6 +46,7 @@ local weeklyImageJobs = {
branches=['release-[0-9]+.[0-9]+.x'],
buildImage=buildImage,
checkTemplate=checkTemplate,
distRunsOn='ubuntu-x64',
golangCiLintVersion=golangCiLintVersion,
imageBuildTimeoutMin=imageBuildTimeoutMin,
imageJobs=imageJobs,
@@ -65,6 +66,7 @@ local weeklyImageJobs = {
branches=['k[0-9]+'],
buildImage=buildImage,
checkTemplate=checkTemplate,
distRunsOn='ubuntu-x64',
golangCiLintVersion=golangCiLintVersion,
imageBuildTimeoutMin=imageBuildTimeoutMin,
imageJobs=imageJobs,
@@ -315,8 +315,8 @@ local runner = import 'runner.libsonnet',
pr_created: '${{ steps.version.outputs.pr_created }}',
}),
dist: function(buildImage, skipArm=true, useGCR=false, makeTargets=['dist', 'packages'])
job.new()
dist: function(buildImage, skipArm=true, useGCR=false, makeTargets=['dist', 'packages'], runsOn='ubuntu-latest')
job.new(runsOn)
+ job.withPermissions({
'id-token': 'write',
})
@@ -14,6 +14,7 @@
changelogPath='CHANGELOG.md',
checkTemplate='./.github/workflows/check.yml',
distMakeTargets=['dist', 'packages'],
distRunsOn='ubuntu-latest',
dryRun=false,
dockerUsername='grafana',
golangCiLintVersion='v2.3.0',
@@ -80,7 +81,7 @@
GCS_SERVICE_ACCOUNT_KEY: '${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}',
}) else {},
version: $.build.version + $.common.job.withNeeds(validationSteps),
dist: $.build.dist(buildImage, skipArm, useGCR, distMakeTargets)
dist: $.build.dist(buildImage, skipArm, useGCR, distMakeTargets, distRunsOn)
+ $.common.job.withNeeds(['version'])
+ $.common.job.withPermissions({
contents: 'write',
+3 -3
View File
@@ -1,10 +1,10 @@
"jobs":
"check":
"uses": "grafana/loki-release/.github/workflows/check.yml@83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"uses": "grafana/loki-release/.github/workflows/check.yml@dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
"with":
"build_image": "grafana/loki-build-image:0.34.7"
"golang_ci_lint_version": "v2.5.0"
"release_lib_ref": "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"release_lib_ref": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
"skip_validation": false
"use_github_app_token": true
"name": "check"
@@ -15,4 +15,4 @@
- "main"
"permissions":
"contents": "read"
"pull-requests": "read"
"pull-requests": "read"
+7 -7
View File
@@ -1,10 +1,10 @@
"jobs":
"check":
"uses": "grafana/loki-release/.github/workflows/check.yml@83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"uses": "grafana/loki-release/.github/workflows/check.yml@dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
"with":
"build_image": "grafana/loki-build-image:0.34.7"
"golang_ci_lint_version": "v2.5.0"
"release_lib_ref": "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"release_lib_ref": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
"skip_validation": false
"use_github_app_token": true
"loki-canary-boringcrypto-image":
@@ -12,7 +12,7 @@
"BUILD_TIMEOUT": 60
"GO_VERSION": "1.24.8"
"IMAGE_PREFIX": "grafana"
"RELEASE_LIB_REF": "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"RELEASE_LIB_REF": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
"RELEASE_REPO": "grafana/loki"
"needs":
- "check"
@@ -136,7 +136,7 @@
"BUILD_TIMEOUT": 60
"GO_VERSION": "1.24.8"
"IMAGE_PREFIX": "grafana"
"RELEASE_LIB_REF": "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"RELEASE_LIB_REF": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
"RELEASE_REPO": "grafana/loki"
"needs":
- "check"
@@ -260,7 +260,7 @@
"BUILD_TIMEOUT": 60
"GO_VERSION": "1.24.8"
"IMAGE_PREFIX": "grafana"
"RELEASE_LIB_REF": "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"RELEASE_LIB_REF": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
"RELEASE_REPO": "grafana/loki"
"needs":
- "check"
@@ -384,7 +384,7 @@
"BUILD_TIMEOUT": 60
"GO_VERSION": "1.24.8"
"IMAGE_PREFIX": "grafana"
"RELEASE_LIB_REF": "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
"RELEASE_LIB_REF": "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
"RELEASE_REPO": "grafana/loki"
"needs":
- "check"
@@ -512,4 +512,4 @@
"workflow_dispatch": {}
"permissions":
"contents": "read"
"pull-requests": "read"
"pull-requests": "read"
+5 -5
View File
@@ -8,7 +8,7 @@ env:
DRY_RUN: false
GITHUB_APP: "loki-gh-app"
IMAGE_PREFIX: "grafana"
RELEASE_LIB_REF: "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
RELEASE_LIB_REF: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
RELEASE_REPO: "grafana/loki"
SKIP_VALIDATION: false
USE_GITHUB_APP_TOKEN: true
@@ -19,11 +19,11 @@ jobs:
contents: "write"
id-token: "write"
pull-requests: "write"
uses: "grafana/loki-release/.github/workflows/check.yml@83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
uses: "grafana/loki-release/.github/workflows/check.yml@dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
with:
build_image: "grafana/loki-build-image:0.34.7"
golang_ci_lint_version: "v2.5.0"
release_lib_ref: "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
release_lib_ref: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
skip_validation: false
use_github_app_token: true
create-release-pr:
@@ -129,7 +129,7 @@ jobs:
contents: "write"
id-token: "write"
pull-requests: "write"
runs-on: "ubuntu-latest"
runs-on: "ubuntu-x64"
steps:
- name: "clean up build tools cache"
run: "rm -rf /opt/hostedtoolcache"
@@ -1111,4 +1111,4 @@ name: "Prepare Minor Release PR from Weekly"
- "k[0-9]+"
permissions:
contents: "read"
pull-requests: "read"
pull-requests: "read"
+5 -5
View File
@@ -8,7 +8,7 @@ env:
DRY_RUN: false
GITHUB_APP: "loki-gh-app"
IMAGE_PREFIX: "grafana"
RELEASE_LIB_REF: "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
RELEASE_LIB_REF: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
RELEASE_REPO: "grafana/loki"
SKIP_VALIDATION: false
USE_GITHUB_APP_TOKEN: true
@@ -19,11 +19,11 @@ jobs:
contents: "write"
id-token: "write"
pull-requests: "write"
uses: "grafana/loki-release/.github/workflows/check.yml@83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
uses: "grafana/loki-release/.github/workflows/check.yml@dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
with:
build_image: "grafana/loki-build-image:0.34.7"
golang_ci_lint_version: "v2.5.0"
release_lib_ref: "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
release_lib_ref: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
skip_validation: false
use_github_app_token: true
create-release-pr:
@@ -129,7 +129,7 @@ jobs:
contents: "write"
id-token: "write"
pull-requests: "write"
runs-on: "ubuntu-latest"
runs-on: "ubuntu-x64"
steps:
- name: "clean up build tools cache"
run: "rm -rf /opt/hostedtoolcache"
@@ -1111,4 +1111,4 @@ name: "Prepare Patch Release PR"
- "release-[0-9]+.[0-9]+.x"
permissions:
contents: "read"
pull-requests: "read"
pull-requests: "read"
+2 -2
View File
@@ -5,7 +5,7 @@ env:
GITHUB_APP: "loki-gh-app"
IMAGE_PREFIX: "grafana"
PUBLISH_TO_GCS: false
RELEASE_LIB_REF: "83e166f5c8795fa94dec9f4cbdb82205fbb8bf2b"
RELEASE_LIB_REF: "dfe753760ce6ec2f4549fc11d2df24a2aa584e3f"
RELEASE_REPO: "grafana/loki"
USE_GITHUB_APP_TOKEN: true
jobs:
@@ -441,4 +441,4 @@ name: "create release"
- "main"
permissions:
contents: "read"
pull-requests: "read"
pull-requests: "read"