diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9738bf5fd5..2721946b91e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,6 @@ on: default: false type: boolean # Nightly releases - schedule: - - cron: "45 8 * * 1-5" push: tags: - "*" # Tags that trigger a new release version diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 101e19c669f..81d6f7aa3ed 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,7 +12,7 @@ on: permissions: contents: read - pull-requests: read + pull-requests: none jobs: golangci-lint: diff --git a/config.go b/config.go index 0bed2ac5546..9e0317fc16b 100644 --- a/config.go +++ b/config.go @@ -12,7 +12,8 @@ import ( type Config struct { // Packages is the slice of Nix packages that devbox makes available in // its environment. - Packages []string `cue:"[...string]" json:"packages,omitempty"` + Packages []string `cue:"[...string]" json:"packages,omitempty"` + ShellHook string `cue:"string" json:"shell-hook"` } // ReadConfig reads a devbox config file. diff --git a/devbox.go b/devbox.go index d8d04b55a40..12687a7d630 100644 --- a/devbox.go +++ b/devbox.go @@ -91,7 +91,8 @@ func (d *Devbox) Build(opts ...docker.BuildOptions) error { // environment. func (d *Devbox) Plan() *planner.BuildPlan { basePlan := &planner.BuildPlan{ - Packages: d.cfg.Packages, + Packages: d.cfg.Packages, + ShellHook: d.cfg.ShellHook, } return planner.MergePlans(basePlan, planner.Plan(d.srcDir)) } diff --git a/planner/plan.go b/planner/plan.go index 1eaf8784390..6cf7c6b375d 100644 --- a/planner/plan.go +++ b/planner/plan.go @@ -13,6 +13,7 @@ import ( // or whether it should be the same structure as devbox.Config. type BuildPlan struct { Packages []string `cue:"[...string]" json:"packages"` + ShellHook string `cue:"string" json:"shell-hook,omitempty"` InstallCommand string `cue:"string" json:"install_command,omitempty"` BuildCommand string `cue:"string" json:"build_command,omitempty"` StartCommand string `cue:"string" json:"start_command,omitempty"` diff --git a/tmpl/shell.nix.tmpl b/tmpl/shell.nix.tmpl index 6933a055be2..7cc1e90226c 100644 --- a/tmpl/shell.nix.tmpl +++ b/tmpl/shell.nix.tmpl @@ -13,6 +13,7 @@ mkShell { export name="devbox" export IN_NIX_SHELL=0 export DEVBOX_SHELL_ENABLED=1 + {{.ShellHook}} ''; packages = [ {{- range .Packages}}