Is there a way to have a shutdown hook for a Github CodeSpace?

29 views Asked by At

We have a devcontainer.json that provides us with the environment that we need in order to run CodeSpaces and build our project. This involves starting a bash script that creates a Postgres.ai snapshot for the developer to have up and running.

Is there a way we can have a "shutdown hook" that is called before the CodeSpace is deleted? Not sure if what I'm asking is supposed to be inside the devcontainer.json or a Github Workflow event that triggers a workflow upon CodeSpace deletion. The idea is to be able to clean-up the Postgres.AI snapshot dedicated to the CodeSpace that would obviously be no longer needed.

The devcontainer.json schema mentioned only a shutdownAction but that seems to be something else?

0

There are 0 answers