-
Notifications
You must be signed in to change notification settings - Fork 17
53 lines (43 loc) · 1.63 KB
/
refresh-lockfiles.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
# This workflow periodically creates new environment lock files based on the newest
# available packages and dependencies.
#
# Environment specifications are given as conda environment.yml files found in
# ``requirements/py**.yml``. These state the packages required, the conda channels
# that the packages will be pulled from, and any versions of packages that need to be
# pinned at specific versions.
#
# For environments that have changed, a pull request will be made and submitted
# to the master branch.
name: Refresh Lockfiles
on:
workflow_dispatch:
schedule:
# Run once a week on a Saturday night.
- cron: 1 0 * * 6
jobs:
gen_lockfiles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install nox
run: |
source $CONDA/bin/activate base
conda install -y -c conda-forge nox pyyaml
- name: generate lockfiles
run: $CONDA/bin/nox --session update_lockfiles
- name: generate token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
id: generate-token
with:
app_id: ${{ secrets.AUTH_APP_ID }}
private_key: ${{ secrets.AUTH_APP_PRIVATE_KEY }}
- name: create pull request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: Updated environment lockfiles
delete-branch: true
branch: auto-update-lockfiles
title: Update CI environment lockfiles
body: |
Lockfiles updated to the latest resolvable environment.