Skip to content

Conversation

@Mandax94
Copy link

@Mandax94 Mandax94 commented Dec 1, 2025

This workflow builds and pushes a Docker container to an Azure Web App upon commits to the main branch.


Note

Adds a GitHub Actions workflow that builds a Docker image, pushes it to GHCR, and deploys it to an Azure Web App on main pushes (or manual run).

  • CI/CD:
    • New workflow /.github/workflows/azure-container-webapp.yml triggered on push to main and workflow_dispatch.
    • Build job: uses docker/setup-buildx-action, logs into ghcr.io, builds and pushes image tagged with ${{ github.sha }} from Dockerfile.
    • Deploy job: uses azure/webapps-deploy@v2 to deploy the pushed image to Azure App Service using AZURE_WEBAPP_PUBLISH_PROFILE and AZURE_WEBAPP_NAME.

Written by Cursor Bugbot for commit 7b878d5. This will update automatically on new commits. Configure here.

This workflow builds and pushes a Docker container to an Azure Web App upon commits to the main branch.
@Mandax94 Mandax94 requested review from a team as code owners December 1, 2025 03:32
workflow_dispatch:

permissions:
contents: read
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing packages write permission for container push

The workflow sets permissions to only contents: read, but the build job pushes a Docker image to GitHub Container Registry at line 63. Pushing to GHCR requires packages: write permission for the GITHUB_TOKEN. Without this permission, the Docker push operation will fail with an authorization error, preventing the workflow from completing successfully.

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant