Check for dependency updates #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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}/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 <[email protected]>" | |
commit-message: Update Grafana Alloy | |
labels: dependencies | |
branch: chore/update-grafana-alloy | |
delete-branch: true |