Tag not monitored by Microsoft.
TasksOperationsNotAllowed
I can't deploy an image of my docker container which I built using github and published in ghcr.io registry.
Here is the log message from github --
##[debug]Evaluating condition for step: 'Build and Push Docker Image'
2##[debug]Evaluating: success()
3##[debug]Evaluating success:
4##[debug]=> true
5##[debug]Result: true
6##[debug]Starting: Build and Push Docker Image
7##[debug]Loading inputs
8##[debug]Evaluating: format('az acr build --registry {0} --image ***:latest .
9##[debug]', secrets.ACR_NAME)
10##[debug]Evaluating format:
11##[debug]..Evaluating String:
12##[debug]..=> 'az acr build --registry {0} --image ***:latest .
13##[debug]'
14##[debug]..Evaluating Index:
15##[debug]....Evaluating secrets:
16##[debug]....=> Object
17##[debug]....Evaluating String:
18##[debug]....=> 'ACR_NAME'
19##[debug]..=> '***'
20##[debug]=> 'az acr build --registry *** --image ***:latest .
21##[debug]'
22##[debug]Result: 'az acr build --registry *** --image ***:latest .
23##[debug]'
24##[debug]Loading env
25Run az acr build --registry *** --image ***:latest .
28##[debug]/usr/bin/bash -e /home/runner/work/_temp/46c7e2d7-f1d4-4893-93bb-4bbf897daa50.sh
29WARNING: Packing source code into tar to upload...
30WARNING: Excluding '.git' based on default ignore rules
31WARNING: Excluding '.gitignore' based on default ignore rules
32WARNING: Uploading archived source code from '/tmp/build_archive_8e8e66a99d4646639bd85be9dcb48e6c.tar.gz'...
33WARNING: Sending context (7.057 KiB) to registry: ***...
34ERROR: (TasksOperationsNotAllowed) ACR Tasks requests for the registry *** and *** are not permitted. Please file an Azure support request at [http://aka.ms/azuresupport] for assistance.
35Code: TasksOperationsNotAllowed
36Message: ACR Tasks requests for the registry *** and *** are not permitted. Please file an Azure support request at [http://aka.ms/azuresupport] for assistance.
37Target: request
38Error: Process completed with exit code 1.
39##[debug]Finishing: Build and Push Docker Image
Here is the code or github actions file content -
name: Deploy to Azure App Service
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
id: build-and-push-image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
cache-from: type=local,dest=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
deploy:
runs-on: ubuntu-latest
needs: build-and-push
steps:
- name: Azure Login
uses: azure/login@v1
with:
creds: |
{
"clientId": "${{ secrets.AZURE_CLIENT_ID }}",
"clientSecret": "${{ secrets.AZURE_CLIENT_SECRET }}",
"tenantId": "${{ secrets.AZURE_TENANT_ID }}",
"subscriptionId": "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
}
- name: Deploy to Azure App Service
uses: azure/appservice@v2
with:
app-name: ${{ secrets.AZURE_WEBAPP_NAME }}
resource-group: ${{ secrets.AZURE_RESOURCE_GROUP }}
package: ${{ steps.build-and-push-image.outputs.images }}
multi-container-config-type: image
multi-container-image-name: ${{ steps.build-and-push-image.outputs.images }}
- name: Set App Service Application Settings
uses: azure/CLI@v1
with:
azcliversion: 2.30.0
inlineScript: |
az webapp config appsettings set \
--name ${{ secrets.AZURE_WEBAPP_NAME }} \
--resource-group ${{ secrets.AZURE_RESOURCE_GROUP }} \
--settings "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} MONGO_URI=${{ secrets.MONGO_URI }}"