Bump mamba-org/setup-micromamba from 1 to 2 in the actions group #9
Workflow file for this run
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
name: Update Default Config | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
update-config: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup environment | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: conda-env.yml | |
environment-name: dolphin-env | |
cache-environment-key: environment-${{ steps.date.outputs.date }} | |
cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
generate-run-shell: false | |
create-args: ${{ matrix.deps.spec }} | |
condarc: | | |
channels: | |
- conda-forge | |
- name: Install | |
run: | | |
pip install --no-deps . | |
- name: Generate default config | |
run: | | |
dolphin config --print-empty -o temp_config.yaml | |
sed -e '/creation_time_utc:/d' \ | |
-e 's|work_directory:.*|work_directory: .|' \ | |
temp_config.yaml > docs/sample_dolphin_config.yaml | |
- name: Check for changes | |
id: git-check | |
run: | | |
git add docs/sample_dolphin_config.yaml | |
git diff --staged --exit-code || echo "changes=true" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
if: steps.git-check.outputs.changes == 'true' | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Update sample_dolphin_config.yaml | |
title: 'Update `sample_dolphin_config.yaml`' | |
body: | | |
This is an auto-update docs/sample_dolphin_config.yaml file based on the latest changes. | |
branch: update-default-config | |
delete-branch: true | |
base: ${{ github.head_ref || github.ref_name }} |