-
Notifications
You must be signed in to change notification settings - Fork 34
59 lines (54 loc) · 2.32 KB
/
update-dependencies.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Update Dependencies
on:
pull_request:
paths:
- '.github/workflows/update-dependencies.yml'
- 'scripts/update_cmake_version.py'
- 'scripts/update_openssl_version.py'
- 'noxfile.py'
workflow_dispatch:
schedule:
- cron: '0 6 * * *' # "At 06:00 every day."
jobs:
update-dep:
name: Update ${{ matrix.dependency_nice }}
if: github.repository_owner == 'scikit-build' || github.event_name != 'schedule'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dependency: "cmake"
dependency_nice: "CMake"
- dependency: "openssl"
dependency_nice: "OpenSSL"
steps:
- uses: actions/checkout@v4
- uses: wntrblm/[email protected]
- name: "Run update: bump ${{ matrix.dependency_nice }}"
id: bump
run: |
nox --force-color -s bump${{ matrix.dependency != 'cmake' && format('-{0}', matrix.dependency) || '' }}
echo "version=$(nox -s ${{ matrix.dependency }}_version 2>/dev/null)" >> $GITHUB_OUTPUT
- run: echo "${{ matrix.dependency_nice }} version is ${{ steps.bump.outputs.version }}"
# we use this step to grab a Github App auth token, so that PRs generated by this workflow
# run the GHA tests.
- uses: actions/create-github-app-token@v1
id: app-token
if: github.ref == 'refs/heads/main' && github.repository == 'scikit-build/cmake-python-distributions'
with:
app-id: ${{ secrets.SCIKIT_BUILD_BOT_APP_ID }}
private-key: ${{ secrets.SCIKIT_BUILD_BOT_APP_PRIVATE_KEY }}
- name: Create Pull Request
if: github.ref == 'refs/heads/main' && github.repository == 'scikit-build/cmake-python-distributions'
uses: peter-evans/create-pull-request@v7
with:
commit-message: '[Bot] Update to ${{ matrix.dependency_nice }} ${{ steps.bump.outputs.version }}'
title: '[Bot] Update to ${{ matrix.dependency_nice }} ${{ steps.bump.outputs.version }}'
body: |
Created by update_${{ matrix.dependency }}_version.py
PR generated by "Update ${{ matrix.dependency_nice }}" [workflow](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
branch: update-${{ matrix.dependency }}-pr
sign-commits: true
token: ${{ steps.app-token.outputs.token }}
delete-branch: true