actions: use keyring manipulation functions

also stop leaking memory