Merge pull request #39 from grafana/add_helm_chart_updater
Add Github workflow to update Alloy chart version
This commit is contained in:
commit
cfdc6b95eb
30
.github/configs/updatecli.d/alloy.yaml
vendored
Normal file
30
.github/configs/updatecli.d/alloy.yaml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
ame: Bump dependency "alloy" for Helm chart "meta-monitoring"
|
||||
sources:
|
||||
alloy:
|
||||
name: Get latest "alloy" Helm chart version
|
||||
kind: helmchart
|
||||
spec:
|
||||
name: alloy
|
||||
url: https://grafana.github.io/helm-charts
|
||||
versionfilter:
|
||||
kind: semver
|
||||
pattern: '*'
|
||||
conditions:
|
||||
alloy:
|
||||
name: Ensure Helm chart dependency "alloy" is specified
|
||||
kind: yaml
|
||||
spec:
|
||||
file: charts/meta-monitoring/Chart.yaml
|
||||
key: $.dependencies[1].name
|
||||
value: alloy
|
||||
disablesourceinput: true
|
||||
targets:
|
||||
alloy:
|
||||
name: Bump Helm chart dependency "alloy" for Helm chart "meta-monitoring"
|
||||
kind: helmchart
|
||||
spec:
|
||||
file: Chart.yaml
|
||||
key: $.dependencies[1].version
|
||||
name: charts/meta-monitoring
|
||||
versionincrement: none
|
||||
sourceid: alloy
|
53
.github/workflows/check-for-dependency-updates.yaml
vendored
Normal file
53
.github/workflows/check-for-dependency-updates.yaml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
name: Check for dependency updates
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Run once a day
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
permissions:
|
||||
contents: "write"
|
||||
pull-requests: "write"
|
||||
|
||||
env:
|
||||
UPDATECLI_CONFIG_DIR: "${{ github.workspace }}/.github/configs/updatecli.d"
|
||||
UPDATECLI_GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
jobs:
|
||||
updateGrafanaAlloy:
|
||||
name: Update Grafana Alloy
|
||||
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-alloy
|
||||
run: |
|
||||
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/grafana-alloy.yaml
|
||||
if ! git diff --exit-code > /dev/null; then
|
||||
echo "changed=true" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
- name: Install Helm
|
||||
if: steps.update-grafana-alloy.outputs.changed == 'true'
|
||||
uses: azure/setup-helm@v3
|
||||
|
||||
- name: Create pull request
|
||||
if: steps.update-grafana-alloy.outputs.changed == 'true'
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
title: "[dependency] Update Grafana Alloy"
|
||||
body: "Updates the Grafana Alloy subchart"
|
||||
base: main
|
||||
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
|
||||
committer: "GitHub <noreply@github.com>"
|
||||
commit-message: Update Grafana Alloy
|
||||
labels: dependencies
|
||||
branch: chore/update-grafana-alloy
|
||||
delete-branch: true
|
Loading…
x
Reference in New Issue
Block a user