-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (44 loc) · 1.43 KB
/
update-libs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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]