diff --git a/.github/workflows/azure-login-canary.yml b/.github/workflows/azure-login-canary.yml index 1e022968..84428df2 100644 --- a/.github/workflows/azure-login-canary.yml +++ b/.github/workflows/azure-login-canary.yml @@ -30,19 +30,47 @@ jobs: az --version - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: 'Az CLI login non-oidc' - uses: 'azure/login@v1' + - name: 'Az CLI login with subscription' + uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: 'Az CLI login oidc' - uses: 'azure/login@v1' + + - run: | + az account show + + - name: 'Az CLI login without subscription' + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + allow-no-subscriptions: true + + - run: | + az account show + + - name: 'Az CLI login with subscription OIDC' + uses: azure/login@v1 with: client-id: ${{ secrets.AZURE_CLIENTID }} tenant-id: ${{ secrets.AZURE_TENANTID }} - subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID }} + + - run: | + az account show + + - name: 'Az CLI login without subscription OIDC' + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZURE_CLIENTID }} + tenant-id: ${{ secrets.AZURE_TENANTID }} + allow-no-subscriptions: true + + - run: | + az account show + + + slack-post-result: runs-on: ubuntu-latest # continue-on-error: true diff --git a/README.md b/README.md index 80adc350..d66a6451 100644 --- a/README.md +++ b/README.md @@ -301,7 +301,8 @@ This action doesn't implement ```az logout``` by default at the end of execution az cache purge az account clear ``` - +## Az CLI dependency +Internally in this action, we use azure CLI and execute `az login` with the credentials provided through secrets. In order to validate the new az CLI releases for this action, [canary test workflow](.github/workflows/azure-login-canary.yml) is written which will execute the action on [az CLI's edge build](https://github.com/Azure/azure-cli#edge-builds) which will fail incase of any breaking change is being introduced in the new upcoming release. The test results can be posted on a slack or teams channel using the corresponding integrations. Incase of a failure, the concern will be raised to [azure-cli](https://github.com/Azure/azure-cli) for taking a necessary action and also the latest CLI installation will be postponed in [Runner VMs](https://github.com/actions/virtual-environments) as well for hosted runner to prevent the workflows failing due to the new CLI changes. # Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a