I'm trying to create a GitHub action that deploys infra and my system to Azure. To log in, I use an azure login action like so:
- name: Azure Login
uses: azure/login@v1.4.0
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
To be able to do this, you must first create a service principal in Azure and store the secrets as a secret in your GitHub repo. I neatly created an sp using the az ad sp create-for-rbac command and defined enough permissions and all (as described here), however... I cannot use the --sdk-auth flag anymore because it's deprecated. I don't know if this flag makes a difference, but there is a difference in the JSON object the Azure CLI outputs compared to previous versions. The (JSON) object this commands outputs looks like so:
{
"appId": "guid",
"displayName": "Name I gave the app in the az ad sp create for RBAC command",
"name": "guid",
"password": "very-secret-string",
"tenant": "guid"
}
This seems to be some sort of a new object because, in previous versions, the object looked slightly different. The previous version of the AZ CLI outputs an object that looks like this:
{
"clientId": "guid",
"clientSecret": "super-secret-string",
"subscriptionId": "guid",
"tenantId": "guid"
}
Now, as a result, the login action in my GH Actions workflow doesn't work anymore and I desperately need it ;)
I also tried to create a Federated Credential, but without a result. Now, I'm out of ideas to be honest and I could use some differenty insights.