code: func (ctx *workflowContext) registerFileCleanupFinalizer(localPath string) {
  	cleanup := func(logger *logrus.Logger) {
  		errRemove := os.Remove(localPath)
  		if nil != errRemove {
  			logger.WithFields(logrus.Fields{
  				"Path":  localPath,
  				"Error": errRemove,
  			}).Warn("Failed to cleanup intermediate artifact")
  		} else {
  			logger.WithFields(logrus.Fields{
  				"Path": relativePath(localPath),
  			}).Debug("Build artifact deleted")
  		}
  	}
  	ctx.registerFinalizer(cleanup)
  }
docs: // Register a finalizer that cleans up local artifacts