sops is able to encrypt arbitrary files, but has special support for yaml, json, and toml if I recall correctly. This action seem to have an undocumented assumption that can be broken for files that are encrypted but not yaml or json.
I suggest this assumption is made explicit in the readme.