From 548a0d129d0a3156be5917a2c64a48282e71c0c5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 Aug 2025 08:36:44 +0000 Subject: [PATCH 1/5] Initial plan From 9aacb93fea3d65905bb95e94b48aa2392c8340ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 Aug 2025 08:46:30 +0000 Subject: [PATCH 2/5] Fix Docker build by installing XDebug from source and adding build tools Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- .docker/php/Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile index f15af8cec..6a2d1822e 100644 --- a/.docker/php/Dockerfile +++ b/.docker/php/Dockerfile @@ -4,9 +4,18 @@ RUN a2enmod rewrite # install needed libraries RUN apt-get update \ && apt-get -y --no-install-recommends install libfontconfig1 libxrender1 libxext6 zlib1g-dev libpng-dev libfreetype6-dev libjpeg62-turbo-dev \ + && apt-get -y --no-install-recommends install build-essential autoconf \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # PHP extensions RUN docker-php-ext-install pdo_mysql exif gd # Enable xdebug for debugging & profiling -RUN pecl install xdebug-3.3.1 && docker-php-ext-enable xdebug gd \ No newline at end of file +RUN cd /tmp && \ + curl -L --insecure https://github.com/xdebug/xdebug/archive/3.3.1.tar.gz | tar xz && \ + cd xdebug-3.3.1 && \ + phpize && \ + ./configure --enable-xdebug && \ + make && \ + make install && \ + docker-php-ext-enable xdebug && \ + cd / && rm -rf /tmp/xdebug-3.3.1 \ No newline at end of file From f77cec2bf241858d6c1ebc280cfe26b1a18d0159 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:40:12 +0000 Subject: [PATCH 3/5] Add GitHub Action workflow to build and push Docker image to DockerHub Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- .github/workflows/docker-publish.yml | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 000000000..7d64e9f56 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,61 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + tags: + - 'v*' + pull_request: + branches: + - main + +env: + REGISTRY: docker.io + IMAGE_NAME: dropapp + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: .docker/php + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file From 1e3c4e7ba33302d546772828e62cb9b87fdbb0e5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:38:04 +0000 Subject: [PATCH 4/5] Update GitHub Actions workflow: manual trigger only and remove arm64 platform Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- .github/workflows/docker-publish.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 7d64e9f56..f9bec6da4 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,14 +1,7 @@ name: Build and Push Docker Image on: - push: - branches: - - main - tags: - - 'v*' - pull_request: - branches: - - main + workflow_dispatch: env: REGISTRY: docker.io @@ -29,7 +22,6 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub - if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} @@ -43,7 +35,6 @@ jobs: images: ${{ env.REGISTRY }}/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch - type=ref,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} @@ -53,8 +44,8 @@ jobs: uses: docker/build-push-action@v5 with: context: .docker/php - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + platforms: linux/amd64 + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha From 58bf64e6957086875bc3a9086f4081acb56fb332 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 Aug 2025 19:34:35 +0000 Subject: [PATCH 5/5] Add pull_request trigger back to GitHub Actions workflow for master branch Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- .github/workflows/docker-publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f9bec6da4..8a1d5460c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -2,6 +2,9 @@ name: Build and Push Docker Image on: workflow_dispatch: + pull_request: + branches: + - master env: REGISTRY: docker.io