input-output-hk / devx

The Developer Experience Shell - This repo contains a nix develop shell for haskell. Its primary purpose is to help get a development shell for haskell quickly and across multiple operating systems (and architectures).
Apache License 2.0
37 stars 9 forks source link

Add hint to reproduce the devshell flavor locally if within GitHub Action #138

Closed yvan-sraka closed 3 months ago

yvan-sraka commented 3 months ago

As suggested by @angerman, in response to issues that @erikd and @sgillespie got while debugging db-sync actions.

The output looks like:

% export GITHUB_ACTIONS=true
% nix develop ".#ghc96"     

 _____ _____ _____    _____         _       _ _    _____ _       _ _ 
|     |     |   __|  |  |  |___ ___| |_ ___| | |  |   __| |_ ___| | |
|-   -|  |  |  |  |  |     | .'|_ -| '_| -_| | |  |__   |   | -_| | |
|_____|_____|_____|  |__|__|__,|___|_,_|___|_|_|  |_____|_|_|___|_|_|

Revision (input-output-hk/devx): 6b241faf9b5ebe1fbbfbd56d0cf96867bf8477e9.
CABAL_DIR set to /Users/yvan/.cabal-devx

Hint: to reproduce this environment locally, use either:
$ nix develop github:input-output-hk/devx#ghc963
$ docker run -it -v $(pwd):/workspaces ghcr.io/input-output-hk/devx-devcontainer:x86_64-linux.ghc963

(nix:nix-shell-env)040[~/GitHub/devx]$ 
angerman commented 3 months ago

I wonder if there was something to emit some other Note/Info/Error thing in GHA.

Yes, something like

echo "::notice::Notice message here"

seems to be supposed to work? https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-notice-message

yvan-sraka commented 3 months ago

isn't if x then str else "" just optional x str?

You right there is a nixpkgs.lib.optionalString thing :)