Update Mathlib Dependencies #1514
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: Update Mathlib Dependencies | |
on: | |
schedule: | |
- cron: '0 * * * *' # This will run every hour | |
jobs: | |
update-dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install elan | |
run: | | |
set -o pipefail | |
curl -sSfL "https://github.com/leanprover/elan/releases/download/v3.1.1/elan-x86_64-unknown-linux-gnu.tar.gz" | tar xz | |
./elan-init -y --default-toolchain none | |
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: "${{ secrets.NIGHTLY_TESTING }}" | |
- name: Configure Git User | |
run: | | |
git config user.name "leanprover-community-mathlib4-bot" | |
git config user.email "[email protected]" | |
- name: Update dependencies | |
run: lake update | |
- name: Generate PR title | |
run: | | |
echo "timestamp=$(date -u +"%Y-%m-%d-%H-%M")" >> "$GITHUB_ENV" | |
echo "pr_title=chore: update Mathlib dependencies $(date -u +"%Y-%m-%d")" >> "$GITHUB_ENV" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: "${{ secrets.NIGHTLY_TESTING }}" | |
commit-message: "chore: update Mathlib dependencies ${{ env.timestamp }}" | |
# this branch is referenced in update_dependencies_zulip.yml | |
branch: "update-dependencies-bot-use-only" | |
base: master | |
title: "${{ env.pr_title }}" | |
body: "This PR updates the Mathlib dependencies." | |
labels: "auto-merge-after-CI" |