Reputation: 771
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?
Upvotes: 4
Views: 1918
Reputation: 771
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
Upvotes: 3