Skip to content

Auto-update Charm Libraries #4510

Auto-update Charm Libraries

Auto-update Charm Libraries #4510

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:
name: Check libraries
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: Check libs
run: |
sudo snap install charmcraft --classic --channel latest/stable
charmcraft fetch-lib
env:
CHARMCRAFT_AUTH: "${{ secrets.CHARMHUB_TOKEN }}"
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # 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@6cd32fd93684475c31847837f87bb135d40a2b79 # v7
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: jnsgruk
assignees: jnsgruk