Update packages #304
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 packages | |
on: | |
# Trigger on request. | |
workflow_dispatch: | |
# Run weekly. | |
schedule: | |
- cron: '0 18 * * 1' | |
jobs: | |
update_packages: | |
name: Update packages on ${{ matrix.branch }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: [trunk] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ matrix.branch }} | |
- uses: tibdex/[email protected] | |
id: generate-token | |
with: | |
app_id: ${{ secrets.PR_SUBMITTER_APP_ID }} | |
private_key: ${{ secrets.PR_SUBMITTER_PRIVATE_KEY }} | |
- uses: actions/[email protected] | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install required packages | |
run: python3 -m pip install -r .github/workflows/requirements.txt | |
- name: Bump versions in packages.yml | |
run: python3 .github/workflows/update-packages.py | |
- name: Bump versions in .github/workflows/requirements.txt | |
run: pur -r .github/workflows/requirements.txt | |
- name: Bump versions in requirements.txt | |
run: pur -r requirements.txt --minor Werkzeug | |
- name: Bump versions in requirements-mpi.txt | |
run: pur -r requirements-mpi.txt | |
- name: Bump versions in requirements-source.txt | |
run: pur -r requirements-source.txt | |
- name: Bump versions in requirements-cupy.txt | |
run: pur -r requirements-cupy.txt | |
- name: Bump versions in generated scripts | |
run: python3 make_dockerfiles.py | |
- name: Display updates | |
run: git diff | |
- name: Create Pull Request | |
uses: peter-evans/[email protected] | |
with: | |
base: ${{ matrix.branch }} | |
commit-message: "[update-packages] Bump package versions" | |
branch: update-packages-${{ matrix.branch }} | |
delete-branch: true | |
title: Update packages on ${{ matrix.branch }} | |
body: Automated changes by `update-packages.yml`. | |
token: ${{ steps.generate-token.outputs.token }} |