Auto-update Charm Libraries #10
This file contains hidden or 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: Auto-update Charm Libraries | |
| on: | |
| # Manual trigger | |
| workflow_dispatch: | |
| # Check for new libs every Monday at 12:00 | |
| schedule: | |
| - cron: "0 12 * * 1" | |
| jobs: | |
| update-lib: | |
| name: Check libraries | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check libs | |
| run: | | |
| sudo snap install charmcraft --classic --channel latest/stable | |
| charmcraft fetch-lib | |
| - uses: tibdex/github-app-token@v2 | |
| id: generate-token | |
| with: | |
| app_id: ${{ secrets.APP_ID }} | |
| private_key: ${{ secrets.APP_KEY }} | |
| - name: Create a PR for local changes | |
| uses: peter-evans/create-pull-request@v8 | |
| id: cpr | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| commit-message: "chore: bump charm libraries" | |
| committer: "Github Actions <github-actions@github.com>" | |
| author: "Github Actions <github-actions@github.com>" | |
| title: "chore(deps): bump charm libraries" | |
| body: Automated action to fetch latest version of charm libraries. | |
| branch: "auto-libs" | |
| delete-branch: true | |
| reviewers: | | |
| manadart | |
| SimonRichardson | |
| assignees: | | |
| manadart | |
| SimonRichardson |