-
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.
* Add update-conda-lockfiles workflow. * Test update-conda-lockfiles * Use app token to trigger checks on created pull requests. * Use official action to generate tokens. * Correct branch name condition. * Allow "All tests" to pass. * Add test lock file. * Document update-conda-lockfiles. * Run pre-commit.
- Loading branch information
Showing
6 changed files
with
734 additions
and
0 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 conda 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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
path: code | ||
ref: ${{ inputs.branch }} | ||
|
||
- uses: actions/create-github-app-token@c8f55efbd427e7465d6da1106e7979bc8aaee856 # v1.10.1 | ||
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@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0 | ||
with: | ||
micromamba-version: '1.5.8-0' | ||
environment-name: update | ||
create-args: >- | ||
python=3.12 | ||
conda-lock | ||
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@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 | ||
with: | ||
base: ${{ inputs.branch }} | ||
path: code | ||
commit-message: "Update conda lockfiles" | ||
branch: update-conda-lockfiles | ||
delete-branch: true | ||
title: Update conda 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,4 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python==3.12 |
Oops, something went wrong.