Add CI action to update Grafana version

Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
This commit is contained in:
Michel Hollands 2024-05-07 09:20:51 +01:00
parent 025bb5b0c3
commit 26e0ad0b85
4 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,28 @@
name: Bump dependency "loki" for Helm chart "meta-monitoring"
sources:
latestGrafanaRelease:
name: Get latest grafana release on Github
kind: githubrelease
spec:
owner: grafana
repository: grafana
name: loki
versionfilter:
kind: latest
conditions:
grafanaImagePublished:
name: Ensure the latest Grafana is published on DockerHub
kind: dockerimage
source-id: latestGrafanaRelease
spec:
image: "grafana/grafana"
targets:
grafana:
name: Update Grafana version in values.yaml
kind: helmchart
spec:
file: values.yaml
key: grafana.image
name: charts/meta-monitoring
versionincrement: none
sourceid: loki

View File

@ -175,3 +175,35 @@ jobs:
labels: dependencies
branch: chore/update-minio
delete-branch: true
updateGrafana:
name: Update the Grafana version
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Updatecli
uses: updatecli/updatecli-action@v2
- name: Run Updatecli
id: update-grafana
run: |
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/grafana.yaml
if ! git diff --exit-code > /dev/null; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
fi
- name: Create pull request
if: steps.update-grafana.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
title: "[dependency] Update the Grafana version"
body: "Updates the Grafana version"
base: main
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
committer: "GitHub <noreply@github.com>"
commit-message: Update Grafana version
labels: dependencies
branch: chore/update-minio
delete-branch: true

View File

@ -32,7 +32,7 @@ spec:
- 0
containers:
- name: grafana
image: grafana/grafana:10.0.0
image: {{- .Values.grafana.image }}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000

View File

@ -31,6 +31,7 @@ local:
enabled: false # This should be set to true if any of the previous is enabled
grafana:
image: grafana/grafana:10.0.0
# Gateway ingress configuration
ingress:
# -- Specifies whether an ingress for the gateway should be created