Update packages #302
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/checkout@v4.1.0 | |
with: | |
ref: ${{ matrix.branch }} | |
- uses: tibdex/github-app-token@v2.1 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.PR_SUBMITTER_APP_ID }} | |
private_key: ${{ secrets.PR_SUBMITTER_PRIVATE_KEY }} | |
- uses: actions/cache@v3.3.2 | |
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 | |
- 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/create-pull-request@v5.0.2 | |
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 }} |