forked from conda-forge/miniforge
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #3 from jaimergp/update-4.14
Update installers to conda 4.14
- Loading branch information
Showing
23 changed files
with
819 additions
and
152 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @conda-forge/miniforge |
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 @@ | ||
name: miniconda-autoupdate | ||
channels: | ||
- conda-forge | ||
- nodefaults | ||
dependencies: | ||
- packaging | ||
- requests |
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,27 @@ | ||
#!/usr/bin/env python | ||
|
||
import re | ||
import requests | ||
from packaging import version | ||
|
||
def get_most_recent_version(name): | ||
request = requests.get( | ||
"https://api.anaconda.org/package/conda-forge/" + name | ||
) | ||
request.raise_for_status() | ||
|
||
pkg = max( | ||
request.json()["files"], key=lambda x: version.parse(x["version"]) | ||
) | ||
return pkg["version"] | ||
|
||
mamba_version = get_most_recent_version("mamba") | ||
|
||
with open("Miniforge3/construct.yaml", "r") as f: | ||
content = f.read() | ||
|
||
# Replace mamba version | ||
content = re.sub(r"mamba [\d.]+$", f"mamba {mamba_version}", content, flags=re.M) | ||
|
||
with open("Miniforge3/construct.yaml", "w") as f: | ||
f.write(content) |
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,17 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "shellcheck", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):(\\d+):(\\d+):\\s(note|warning|error):\\s(.*)\\s\\[(SC\\d+)\\]$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 5, | ||
"code": 6 | ||
} | ||
] | ||
} | ||
] | ||
} |
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,32 @@ | ||
name: Auto-update mamba | ||
on: | ||
schedule: | ||
- cron: "0 */6 * * *" | ||
jobs: | ||
createPullRequest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ssh-key: ${{ secrets.MINIFORGE_AUTOUPDATE_SSH_PRIVATE_KEY }} | ||
- uses: conda-incubator/setup-miniconda@35d1405e78aa3f784fe3ce9a2eb378d5eeb62169 | ||
with: | ||
miniforge-variant: Miniforge3 | ||
environment-file: .github/actions/autoupdate/environment.yml | ||
- run: python .github/actions/autoupdate/update.py | ||
- name: Create Pull Request | ||
id: cpr | ||
# This is the v3 tag but for security purposes we pin to the exact commit. | ||
uses: peter-evans/create-pull-request@18f90432bedd2afd6a825469ffd38aa24712a91d | ||
with: | ||
commit-message: "Update mamba version" | ||
title: "Update mamba version" | ||
body: | | ||
This PR was created by the autoupdate action as it detected that | ||
the mamba version has changed and thus should be updated | ||
in the configuration. | ||
Due to limitations of Github Actions, you will need to close/reopen | ||
the PR to get the actions running. | ||
branch: autoupdate-action | ||
delete-branch: true |
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
Oops, something went wrong.