leanprover-community/Lean update

Attempts to update lean and dependencies of a lean project

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jun 24, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: leanprover-community/lean-update@6f7b598c3255645e06f5d31f9f77b7440fc16451 # v0.12.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
lake_package_directoryThe directory containing the Lake package to update. This parameter is passed to the lake-package-directory argument of leanprover/lean-action. no.
update_lean_toolchainControls whether to update the lean-toolchain file for projects with no dependencies. Allowed values: * `auto`: Update the lean-toolchain file to the latest release (default behavior) * `never`: Do not update the lean-toolchain file Default: `auto` noauto
release_kind_to_fetchThe kind of the latest Lean release to fetch. This parameter is used only for Lean, not used for fetching other lake dependencies. Allowed values: * `nightly`: fetch the latest nightly release * `tagged`: fetch the latest tagged release (including both stable and pre-releases) notagged
legacy_updateIf set to `true`, executes `lake -R -Kenv=dev update` instead of `lake update`. Allowed values: * `true`: Execute `lake -R -Kenv=dev update` * `false`: Execute `lake update` Default: `false` nofalse
build_argsBuild arguments to pass to `lake build` during post-update validation. no--log-level=warning
on_update_succeedsWhat to do when an update is available and post-update validation is successful. Allowed values: * `silent`: Do nothing * `commit`: directly commit the updated files * `issue`: notify the user by creating an issue. No new issue will be created if one already exists. * `pr`: notify the user by creating a pull request. No new PR will be created if one already exists. Default: `pr`. nopr
on_update_failsWhat to do when an update is available and post-update validation fails. Allowed values: * `silent`: Do nothing * `issue`: notify the user by creating an issue. No new issue will be created if one already exists. * `fail`: fail the action. Default: `issue`. noissue
update_if_modifiedSpecifies which files, when updated during `lake update`, will cause the action to update code or notify the user. This option does not affect the behavior when post-update validation fails after `lake update`. Allowed values: * `lean-toolchain`: If `lean-toolchain` is specified, this GitHub Action will skip updates unless the Lean version is updated. Here, "skipping updates" means "not attempting to update code or send notifications when post-update validation succeeds after lake update". * `lake-manifest.json`: if `lake-manifest.json` is specified, this GitHub Action will perform an update if any dependent package is updated. Default: `lake-manifest.json` nolake-manifest.json
tokenA Github token to be used for committing no${{ github.token }}
namedescription
has_dependencyThis value is `true` or `false` depending on whether the lake package has dependencies.
resultThe action outputs `no-update`, `update-success` or `update-fail` depending on the three possible scenarios. Description of each value: * `no-update`: No update was available. * `update-success`: An update was available and post-update validation was successful. * `update-fail`: An update was available but post-update validation failed.
latest_leanThe latest Lean release version, including both stable and pre-release versions. This value could be also nightly. ## Note * This is not necessarily matching to the updated content of the lean-toolchain file of the lake package. * This value is fetched according to the `release_kind_to_fetch` option.
notifyIndicates whether there is an event worth notifying the user about. Returns `true` in the following cases: * When updates are available and post-update validation succeeds. However, if `update_if_modified` is set to `lean-toolchain`, this is only true when the Lean version has been updated. * When updates are available and post-update validation fails. Returns `false` in all other cases.