Skip to content

Commit

Permalink
ci: fix auto-update charm libraries automated flow
Browse files Browse the repository at this point in the history
  • Loading branch information
skatsaounis committed Oct 21, 2024
1 parent 5f588aa commit 7b36e08
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/update-libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,23 @@ jobs:
commit-username: maas-lander
commit-email: [email protected]

detect-open-prs:
name: Check open library updates PRs
needs: update-lib-region
runs-on: ubuntu-22.04
outputs:
open_prs: ${{ steps.open-prs.outputs.open_prs }}
steps:
- 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"
update-lib-agent:
name: Check libraries
needs: update-lib-region
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:
Expand Down

0 comments on commit 7b36e08

Please sign in to comment.