mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
c6a0175c04
* ci: use go.mod as source of truth for actions/setup-go action Signed-off-by: Dave Henderson <dave.henderson@grafana.com> * updating upgrading-go-version.md doc Signed-off-by: Dave Henderson <dave.henderson@grafana.com> --------- Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
name: "publish-kinds-next"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- '**/*.cue'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
config:
|
|
runs-on: "ubuntu-latest"
|
|
if: github.repository == 'grafana/grafana'
|
|
outputs:
|
|
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
|
steps:
|
|
- name: "Check for secrets"
|
|
id: check
|
|
shell: bash
|
|
run: |
|
|
if [ -n "${{ (secrets.GRAFANA_DELIVERY_BOT_APP_ID != '' &&secrets.GRAFANA_DELIVERY_BOT_APP_PEM != '') || '' }}" ]; then
|
|
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
main:
|
|
needs: config
|
|
if: github.repository == 'grafana/grafana' && needs.config.outputs.has-secrets
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- name: "Checkout Grafana repo"
|
|
uses: "actions/checkout@v4"
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: "Setup Go"
|
|
uses: "actions/setup-go@v4"
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: "Verify kinds"
|
|
run: go run .github/workflows/scripts/kinds/verify-kinds.go
|
|
|
|
- name: "Generate token"
|
|
id: generate_token
|
|
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
|
with:
|
|
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
|
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
|
|
|
- name: "Clone website-sync Action"
|
|
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafana-delivery-bot:${{ steps.generate_token.outputs.token }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
|
|
|
- name: "Publish to kind registry (next)"
|
|
uses: "./.github/actions/website-sync"
|
|
id: "publish-next"
|
|
with:
|
|
repository: "grafana/kind-registry"
|
|
branch: "main"
|
|
host: "github.com"
|
|
github_pat: "grafana-delivery-bot:${{ steps.generate_token.outputs.token }}"
|
|
source_folder: ".github/workflows/scripts/kinds/next"
|
|
target_folder: "grafana/next"
|