I've found the root cause for this problem. In my GitHub secrets, I had AZURE_SUBSCRIPTION_ID
which contained roleId I tried to output from workflow. GitHub Actions evaluates whether wanted output contains one of the secrets of the repository and if that's the case, then it won't allow to output these values.
This is format of the output:
/subscriptions/AZURE_SUBSCRIPTION_ID/providers/Microsoft.Authorization/roleDefinitions/roleId
My solution to it was to move AZURE_SUBSCRIPTION_ID
to repository variables instead of secrets and now it's working correctly.