Both ways should be valid, but the regular nested YAML keys seems to be the format of the regular GitHub Actions docs