GitHub Action which automatically updates Lean projects
// readme
Lean Update
A GitHub Action that attempts to update Lean and dependencies of a Lean project. This is basically a fork of oliver-butterley/lean-update but more feature-rich.
Quick Setup
Create a file named update.yml in the .github/workflows directory.
If you want to keep dependencies always up-to-date
To keep dependencies always up-to-date, you might want to configure as follows:
name: Update Lean Project
on:
schedule:
- cron: "0 0 * * *" # every day
workflow_dispatch: # allows workflow to be triggered manually
jobs:
update_lean:
# this is needed for private repositories
permissions:
contents: write
pull-requests: write
issues: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Update Lean project
uses: leanprover-community/lean-update@main
When you only want to update when there is a new Lean version
If you want to skip updates unless there is a change to the lean-toolchain file, you might want to configure as follows:
name: Update Lean Project
on:
schedule:
-…