-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from glotzerlab/implement-update-uv-lockfiles
Implement update uv lockfiles
- Loading branch information
Showing
6 changed files
with
121 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Update uv lockfiles | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
required: true | ||
type: string | ||
command: | ||
default: ./update-lockfiles.sh | ||
required: false | ||
type: string | ||
path: | ||
default: .github/workflows/environments | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
with: | ||
path: code | ||
ref: ${{ inputs.branch }} | ||
|
||
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 | ||
id: generate-token | ||
with: | ||
app-id: ${{ secrets.PR_SUBMITTER_APP_ID }} | ||
private-key: ${{ secrets.PR_SUBMITTER_PRIVATE_KEY }} | ||
|
||
- name: Create python environment | ||
uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0 | ||
with: | ||
micromamba-version: '1.5.8-0' | ||
environment-name: update | ||
create-args: >- | ||
python=3.12 | ||
uv | ||
micromamba-root-path: ${{ github.workspace }}/micromamba | ||
|
||
- name: Configure conda environment variables | ||
run: | | ||
echo "$MAMBA_ROOT_PREFIX/envs/update/bin" >> $GITHUB_PATH | ||
- name: Update lockfiles | ||
run: ${{ inputs.command }} | ||
working-directory: code/${{ inputs.path }} | ||
|
||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 | ||
with: | ||
base: ${{ inputs.branch }} | ||
path: code | ||
commit-message: "Update uv lockfiles" | ||
branch: update-uv-lockfiles | ||
delete-branch: true | ||
title: Update uv lockfiles on ${{ inputs.branch }} | ||
body: Automated changes by `${{ inputs.command }}`. | ||
token: ${{ steps.generate-token.outputs.token }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file was autogenerated by uv via the following command: | ||
# uv pip compile --python-version 3.13 --python-platform linux requirements.in | ||
build==1.1.1 | ||
# via -r requirements.in | ||
packaging==24.1 | ||
# via build | ||
pyproject-hooks==1.2.0 | ||
# via build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# Execute this script to update all lock files to the latest versions of dependencies. | ||
|
||
rm -f requirements*.txt | ||
|
||
uv pip compile --python-version 3.13 --python-platform linux requirements.in > requirements.txt |