-
Notifications
You must be signed in to change notification settings - Fork 27
47 lines (41 loc) · 1.48 KB
/
update-lockfile.yaml
File metadata and controls
47 lines (41 loc) · 1.48 KB
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
name: Update locked envs
on:
schedule:
- cron: "0 8 1,16 * *" # Bi-weekly
workflow_dispatch:
jobs:
update-lockfiles:
if: ${{ github.ref == 'refs/heads/master' }}
name: Update lockfiles
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v6
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.5
with:
pixi-version: v0.59.0
- name: Full resolve (exclude packages newer than 7 days)
# Exclude recently published packages to avoid pulling in broken or
# yanked releases before upstream has had time to react
run: |
EXCLUDE_DATE=$(date -u -d '7 days ago' +%Y-%m-%dT00:00:00Z)
sed -i "/^\[workspace\]/a exclude-newer = \"$EXCLUDE_DATE\"" pixi.toml
rm pixi.lock
pixi install --all
git checkout pixi.toml
- name: Export conda environment files
if: ${{ !vars.PYPSA_BOT_ID }}
run: pixi run sync-locks
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-locked-environment
title: "[github-actions.ci] Update locked envs"
body: |
Automatically generated PR to update the pixi lockfile.
**Note: Do not merge without manual test execution, unless pypsa-bot has already exported the environment files and triggered tests.**
commit-message: "Update locked environment files for all platforms"