Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions Build Error: Invalid App Path for Django-Celery-Beat Dockerfile #604

Closed
csulit opened this issue Jan 21, 2024 · 3 comments
Closed

Comments

@csulit
Copy link

csulit commented Jan 21, 2024

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
Copy link

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
Copy link
Author

csulit commented Jan 26, 2024

When the Dockerfile is not named with any extension like .beat, it works properly.

@max-zaytsev max-zaytsev removed the triage label Feb 2, 2024
@max-zaytsev
Copy link

This repository is about Azure DevOps yaml templates only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants