GitHub Actions Build Error: Invalid App Path for Django-Celery-Beat Dockerfile
csulit opened this issue · 3 comments
csulit commented
yml
name: Trigger auto deployment for django-celery-beat
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- 'Dockerfile.beat/**'
- '.github/workflows/django-celery-beat-AutoDeployTrigger-3c325f45-9bab-4d98-810b-5d0d69e1ed80.yml'
# Allow manual trigger
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.DJANGOCELERYBEAT_AZURE_CREDENTIALS }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}/Dockerfile.beat
registryUrl: kmccontainerhub.azurecr.io
registryUsername: ${{ secrets.DJANGOCELERYBEAT_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.DJANGOCELERYBEAT_REGISTRY_PASSWORD }}
containerAppName: django-celery-beat
resourceGroup: ERP_CONTAINER_APP
imageToBuild: kmccontainerhub.azurecr.io/django-celery-beat:${{ github.sha }}
logs
ERROR: failed to build: invalid app path '/home/runner/work/django-api/django-api/Dockerfile.worker': app path must be a directory or zip
Warning: Unable to run 'pack build' command to produce runnable application image: The process '/usr/local/bin/pack' failed with exit code 1
/usr/local/bin/pack build ***.azurecr.io/django-celery-worker:acf123c7c333db9d3ce79fe0e0d9db53cc992[50](https://github.com/kmcwebdev/django-api/actions/runs/7599059432/job/20695704629#step:5:51)6 --path /home/runner/work/django-api/django-api/Dockerfile.worker --builder mcr.microsoft.com/oryx/builder:debian-bookworm-20231107.2 --env CALLER_ID=github-actions-v2
ERROR: failed to build: invalid app path '/home/runner/work/django-api/django-api/Dockerfile.worker': app path must be a directory or zip
Warning: Unable to run 'pack build' command to produce runnable application image: The process '/usr/local/bin/pack' failed with exit code 1
Error: No builder was able to build the provided application source. Please visit the following page for more information on supported platform versions: https://aka.ms/SourceToCloudSupportedVersions
Error: No builder was able to build the provided application source. Please visit the following page for more information on supported platform versions: https://aka.ms/SourceToCloudSupportedVersions
ismayilov-ismayil commented
Hi @csulit, thanks for reporting.
Could you please describe your issue detailed.
When this issue started or it's new pipeline?
Could you please confirm that the path is reachable and you are able to build that docker manually?
csulit commented
When the Dockerfile is not named with any extension like .beat, it works properly.
max-zaytsev commented
This repository is about Azure DevOps yaml templates only.