CI: Unconditionally dispatch to GE (#107271)

* CI: Unconditionally dispatch to GE

* only do release-build in the grafana repo
This commit is contained in:
Kevin Minehart
2025-06-26 13:28:42 -05:00
committed by GitHub
parent 07f5a72842
commit 01c3f99e4a

View File

@ -39,8 +39,10 @@ jobs:
setup:
name: setup
runs-on: github-hosted-ubuntu-x64-small
if: github.repository == 'grafana/grafana'
outputs:
version: ${{ steps.output.outputs.version }}
grafana-commit: ${{ steps.output.outputs.grafana_commit }}
permissions:
contents: read
steps:
@ -59,7 +61,9 @@ jobs:
REF_NAME: ${{ github.ref_name }}
BUILD_ID: ${{ github.run_number }}
- id: output
run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
run: |
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
echo "grafana_commit=$(git rev-parse HEAD)" | tee -a "$GITHUB_OUTPUT"
# Triggers the same workflow in `grafana-enterprise` on the same ref
downstream:
runs-on: github-hosted-ubuntu-x64-small
@ -68,7 +72,6 @@ jobs:
contents: read
id-token: write
name: Dispatch grafana-enterprise build
if: ${{ github.event_name == 'workflow_dispatch' }}
steps:
- id: vault-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
@ -89,10 +92,11 @@ jobs:
VERSION: ${{ needs.setup.outputs.version }}
BUILD_ID: ${{ github.run_number }}
BUCKET: grafana-prerelease
GRAFANA_COMMIT: ${{ needs.setup.outputs.grafana-commit }}
with:
github-token: ${{ steps.generate_token.outputs.token }}
script: |
const {REF, VERSION, BUILD_ID, BUCKET} = process.env;
const {REF, VERSION, BUILD_ID, BUCKET, GRAFANA_COMMIT} = process.env;
await github.rest.actions.createWorkflowDispatch({
owner: 'grafana',
@ -103,6 +107,7 @@ jobs:
"version": VERSION,
"build-id": String(BUILD_ID),
"bucket": BUCKET,
"grafana-commit": GRAFANA_COMMIT,
}
})