3

I'm creating an action (using actions/javascript-actions) that creates something and then needs to clean up that something should someone cancel the job halfway.

I'm having trouble finding how to hook into pre-exit/cancel and do cleanup actions. Is this possible? Does anyone have any suggestions on achieving this?

Mikael Dúi Bolinder
  • 2,080
  • 2
  • 19
  • 44
NorseGaud
  • 355
  • 1
  • 11

1 Answers1

3

Finally figured it out. actions/checkout is a great example of the post "runs" to achieve this.

runs:
  using: node12
  main: dist/index.js
  post: dist/index.js
Mikael Dúi Bolinder
  • 2,080
  • 2
  • 19
  • 44
NorseGaud
  • 355
  • 1
  • 11