Skip to content

Commit

Permalink
build the son
Browse files Browse the repository at this point in the history
  • Loading branch information
SimOnPanw committed Dec 5, 2024
1 parent 470dea1 commit 6c57955
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/checkpermissions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,21 @@ jobs:
- name: Checkout Repository Content
uses: actions/checkout@v3

- name: Construct Azure Credentials
id: construct_creds
run: |
echo "{\"clientId\":\"${{ secrets.APP2_AZURE_CLIENT_ID }}\",\"clientSecret\":\"${{ secrets.APP2_AZURE_CLIENT_SECRET }}\",\"subscriptionId\":\"${{ secrets.AZURE_SUBSCRIPTION_ID }}\",\"tenantId\":\"${{ secrets.APP2_AZURE_TENANT_ID }}\"}" > azure_credentials.json
echo "AZURE_CREDENTIALS=$(cat azure_credentials.json)" >> $GITHUB_ENV
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_JSON_CREDENTIALS }}

- name: Execute Azure CLI Command
- name: Check the role
env:
APP_ID: ${{ env.AZURE_CLIENT_ID }}
SUBSCRIPTION_ID: ${{ env.SUBSCRIPTION_ID }}
RESOURCE_GROUP: ${{ env.RESOURCE_GROUP }}
ACR_NAME: ${{ env.ACR_NAME }}
run: |
az role assignment list --assignee $APP_ID --scope /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ContainerRegistry/registries/$ACR_NAME

0 comments on commit 6c57955

Please sign in to comment.