Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure env is rebuilt when use cached env is set to false #37

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-book.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
if: |
(inputs.use_cached_environment != 'true'
|| steps.cache.outputs.cache-hit != 'true')
&& steps.parse_config.outputs.execute_notebooks != 'binder'
&& steps.parse_config.outputs.execute_notebooks == 'binder'
Copy link
Member

@brian-rose brian-rose Feb 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgrover1 I think this is not the right fix for the problem you were having.

This line was meant to run this workflow step only if executing the notebooks on GitHub Actions. In that case, we need to build an execution environment here.

For executing on binder, the environment.yml file is ignored and we just build a minimal JupyterBook + binderbot environment (see this line)

If I understand correctly, the problem you were trying to solve is the case where we execute on binder, but there is a change in the environment.yml file so a new image needs to be built on the binder. Is that correct? We'll need a different fix for that.

Currently the call to binderbot is hard-wired to the main branch (this line) so we always use the image associated with current main branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification here @brian-rose and sorry for merging without getting more feedback first!

run: mamba env update -n ${{ inputs.environment_name }} -f ${{ inputs.environment_file }}

- name: Get paths to notebook files
Expand Down