Skip to content

Update Lean Project

Update Lean Project #6

Workflow file for this run

name: Update Lean Project
on:
schedule:
- cron: "0 10 * * *" # every day
workflow_dispatch: # allows workflow to be triggered manually
jobs:
update_lean:
permissions:
contents: write
pull-requests: write
issues: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get latest Lean nightly
run: curl -s release.lean-lang.org | jq -r '.nightly[0].name' | sed 's/^/leanprover\/lean4:/' > lean-toolchain
- name: Append empty lines to lake-manifest.json to trick lean-update into leaving the lean-toolchain file alone
run: printf '\n%.0s' {1..10} >> lake-manifest.json
- name: Update Lean project
uses: leanprover-community/lean-update@main
with:
update_if_modified: lean-toolchain
on_update_succeeds: "commit"
on_update_fails: "issue"