* Update update-fixed-env.yaml * Update update-fixed-env.yaml * Update update-fixed-env.yaml * handle reuse * fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update update-fixed-env.yaml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
e35f651518
commit
3e2286633a
32
.github/workflows/update-fixed-env.yaml
vendored
32
.github/workflows/update-fixed-env.yaml
vendored
@ -1,39 +1,39 @@
|
|||||||
name: Fixed Environment YAML Monitor
|
name: Fixed-Version Environment Checker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- 'env/environment.yaml'
|
- 'envs/environment.yaml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_environment_fixed:
|
update-environment-fixed:
|
||||||
|
name: Update environment.fixed.yaml
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup micromamba
|
- name: Setup conda
|
||||||
uses: mamba-org/setup-micromamba@v1
|
uses: conda-incubator/setup-miniconda@v3
|
||||||
with:
|
with:
|
||||||
micromamba-version: latest
|
activate-environment: pypsa-eur
|
||||||
environment-file: envs/environment.yaml
|
environment-file: envs/environment.yaml
|
||||||
log-level: debug
|
|
||||||
init-shell: bash
|
|
||||||
cache-environment: true
|
|
||||||
cache-downloads: true
|
|
||||||
|
|
||||||
- name: Update environment.fixed.yaml
|
- name: Update environment.fixed.yaml
|
||||||
run: |
|
run: |
|
||||||
mamba env export --file envs/environment.fixed.yaml --no-builds
|
conda env export --name pypsa-eur --no-builds > envs/environment.fixed.yaml
|
||||||
|
|
||||||
|
- name: Add SPDX header
|
||||||
|
run: |
|
||||||
|
SPDX_HEADER="# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors\n# SPDX-License-Identifier: CC0-1.0\n"
|
||||||
|
echo -e "$SPDX_HEADER" | cat - envs/environment.fixed.yaml > temp && mv temp envs/environment.fixed.yaml
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: update-environment-fixed
|
branch: update-environment-fixed
|
||||||
title: Update fixed environment
|
title: "[github-actions.ci] Update fixed environment"
|
||||||
body: Automatically generated PR to update environment.fixed.yaml
|
body: Automatically generated PR to update environment.fixed.yaml, since environment.yaml was updated.
|
||||||
labels: automated
|
|
||||||
|
Loading…
Reference in New Issue
Block a user