Auto-update Charm Libraries #2660
This file contains 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 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@b4ffde65f46336ab88eb53be808477a3936bae11 # 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@153407881ec5c347639a548ade7d8ad1d6740e38 # v5 | |
id: cpr | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
commit-message: "chore: bump charm libraries" | |
committer: "Github Actions <[email protected]>" | |
author: "Github Actions <[email protected]>" | |
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 |