Using “post” in Docker action

In nodejs action, it’s possible to use ‘post’ for cleanup:
action.yml

runs:
  using: 'node12'
  main: 'dist/index.js'
  post: 'dist/index.js'

index.js:

const isPost = Boolean(process.env['STATE_isPost'])

If isPost is true, then it’s a cleanup step.

How to request ‘post’ in Docker action, is it supported?

runs:
  using: 'docker'
  image: 'Dockerfile'
  ?

Hi @zmeyc,

post ’ is only used for javasript action, for docker action, please use ’ post-entrypoint '.

runs:
  using: 'docker'
  image: 'Dockerfile'
  args:
  - 'bzz'
  entrypoint: 'main.sh'
  post-entrypoint: 'cleanup.sh'

Please check the official doc for more details.

Thanks.

1 Like