NASA-Openscapes / earthdata-cloud-cookbook

A tutorial book of workflows for research using NASA EarthData in the Cloud created by the NASA-Openscapes team
https://nasa-openscapes.github.io/earthdata-cloud-cookbook
Other
85 stars 30 forks source link

Fix GitHub Action Build: miniconda #160

Closed jules32 closed 1 year ago

jules32 commented 1 year ago

Documenting a bit of the build fail and Slack conversation from this morning:

The Cookbook’s GitHub Action is erroring today with something about miniconda: https://github.com/NASA-Openscapes/earthdata-cloud-cookbook/actions/runs/3943572277/jobs/6748548403#step:3:1677. If anyone has any leads on what needs to be updated please share! @cassienickles and I are exploring around too. Cassie found https://github.com/conda-incubator/setup-miniconda/issues/274 and used their first work around, replacing mamba-version: "*" with miniforge-variant: Mambaforge in podaac's quarto-publish.yml

@jhkennedy suggested replacing this:

      - uses: conda-incubator/setup-miniconda@v2
        with:
          mamba-version: "*"
          python-version: "3.10"
          activate-environment: <NAME IN ENVIRONMENT.YML>
          environment-file: environment.yml

with Option 1:

    - uses: conda-incubator/setup-miniconda@v2
      with:
        python-version: 3.8
        channels: conda-forge
        miniforge-variant: Mambaforge
        activate-environment: quarto-import
        environment-file: _import/environment.yml

or: Option 2. Joe: I'd recommend micromamba personally (we switch over entirely to it) but either is fine really.

      - uses: mamba-org/provision-with-micromamba@v14
        with:
          environment-file: _import/environment.yml
          extra-specs: |
            python=3.8

Ultimately, I did Option 1 (since it was most similar to our previous approach) and it worked! But happy to switch to micromamba in the future.