<p>I have the following job definition</p>
<pre><code>  - uses: actions/checkout@v2
  - uses: azure/login@v1
    with:
      creds: ${{ secrets.BETA_AZURE_CREDENTIALS }}
  - uses: azure/docker-login@v1
    with:
      login-server: ${{ secrets.BETA_ACR_SERVER }}
      username: ${{ secrets.BETA_ACR_USERNAME }}
      password: ${{ secrets.BETA_ACR_PASSWORD }}
  - run: docker build -f .ops/account.dockerfile -t ${{ secrets.BETA_ACR_SERVER }}/account:${{ github.sha }} -t ${{ secrets.BETA_ACR_SERVER }}/account:latest .
    working-directory: ./Services
  - run: docker push ${{ secrets.BETA_ACR_SERVER }}/account:${{ github.sha }}
  - uses: azure/setup-kubectl@v2.0
  - uses: azure/aks-set-context@v2.0
    with:
      resource-group: ${{ secrets.BETA_RESOURCE_GROUP }}
      cluster-name: ${{ secrets.BETA_AKS_CLUSTER }}
  - run: kubectl -n pltfrmd set image deployments/account account=${{ secrets.BETA_ACR_SERVER }}/account:${{ github.sha }}
</code></pre>
<p>The docker function works fine and it pushes to ACR without issue.</p>
<p>But then even though the ask-set-context works, the run kubectl command doesn't execute and just hangs waiting for an interactive login prompt.</p>
<p>What am I doing wrong? How do I get Github actions to let me execute the kubectl command properly?</p>

James Hancock
<p>Setting 'admin' to true worked for me.</p>
<pre><code>- uses: azure/aks-set-context@v2.0
with:
  resource-group: ${{ secrets.BETA_RESOURCE_GROUP }}
  cluster-name: ${{ secrets.BETA_AKS_CLUSTER }}
  admin: true
</code></pre>
