Skip to content

Auto-update Charm Libraries #1526

Auto-update Charm Libraries

Auto-update Charm Libraries #1526

Workflow file for this run

name: Auto-update Charm Libraries
on:
# Manual trigger
workflow_dispatch:
# Check regularly the upstream every four hours
schedule:
- cron: "0 0,4,8,12,16,20 * * *"
jobs:
update-lib-region:
name: Check libraries
uses: canonical/observability/.github/workflows/charm-update-libs.yaml@main
secrets: inherit
with:
charm-path: maas-region
commit-username: maas-lander
commit-email: [email protected]
detect-open-prs:
name: Check open library updates PRs
needs: update-lib-region
runs-on: ubuntu-24.04
outputs:
open_prs: ${{ steps.open-prs.outputs.open_prs }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for any pre-existing PR and save it in the output
id: open-prs
run: |
OPEN_PRS="$(gh pr list --head chore/auto-libs --state open --json id --jq 'length')"
echo "open_prs=$OPEN_PRS" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.OBSERVABILITY_NOCTUA_TOKEN }}
update-lib-agent:
name: Check libraries
needs: detect-open-prs
if: needs.detect-open-prs.outputs.open_prs == '0'
uses: canonical/observability/.github/workflows/charm-update-libs.yaml@main
secrets: inherit
with:
charm-path: maas-agent
commit-username: maas-lander
commit-email: [email protected]