Skip to content

Update lock files

Update lock files #9

# Workflow to update lock files
name: Update lock files
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * 1'
jobs:
update_lock_files:
if: github.repository == 'scikit-learn/scikit-learn'
runs-on: ubuntu-latest
strategy:
# Ensure that each build will continue even if one build in the matrix fails
fail-fast: false
matrix:
include:
- name: main
update_script_args: "--select-tag main-ci"
additional_commit_message: "[doc build]"
- name: scipy-dev
update_script_args: "--select-tag scipy-dev"
additional_commit_message: "[scipy-dev]"
- name: cirrus-arm
update_script_args: "--select-tag arm"
additional_commit_message: "[cirrus arm]"
- name: pypy
update_script_args: "--select-tag pypy"
additional_commit_message: "[pypy]"
steps:
- uses: actions/checkout@v4
- name: Generate lock files
run: |
source build_tools/shared.sh
source $CONDA/bin/activate
conda install -n base conda conda-libmamba-solver -y
conda config --set solver libmamba
conda install -c conda-forge "$(get_dep conda-lock min)" -y
python build_tools/update_environments_and_lock_files.py ${{ matrix.update_script_args }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
push-to-fork: scikit-learn-bot/scikit-learn
commit-message: Update CI lock files ${{ matrix.additional_commit_message }}
committer: "Lock file bot <[email protected]>"
author: "Lock file bot <[email protected]>"
delete-branch: true
branch: auto-update-lock-files-${{ matrix.name }}
title: ":lock: :robot: CI Update lock files for ${{ matrix.name }} CI build(s) :lock: :robot:"
body: |
Update lock files.
### Note
If the CI tasks fail, create a new branch based on this PR and add the required fixes to that branch.
- name: Check Pull Request
if: steps.cpr.outputs.pull-request-number != ''
run: |
echo "### :rocket: Pull-Request Summary" >> ${GITHUB_STEP_SUMMARY}
echo "" >> ${GITHUB_STEP_SUMMARY}
echo "The following lock files pull-request has been auto-generated:"
echo "- **PR** #${{ steps.cpr.outputs.pull-request-number }}" >> ${GITHUB_STEP_SUMMARY}
echo "- **URL** ${{ steps.cpr.outputs.pull-request-url }}" >> ${GITHUB_STEP_SUMMARY}
echo "- **Operation** [${{ steps.cpr.outputs.pull-request-operation }}]" >> ${GITHUB_STEP_SUMMARY}
echo "- **SHA** ${{ steps.cpr.outputs.pull-request-head-sha }}" >> ${GITHUB_STEP_SUMMARY}