From f72ebd9ccd61fdad8249ba4b1efbf2d313034628 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 14:00:55 +0000 Subject: [PATCH 1/5] Initial plan From 37623067ef642d46c673f9e0958a1146adea43a7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 14:04:11 +0000 Subject: [PATCH 2/5] Add container upload workflow with minimal Alpine image Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com> --- .github/workflows/container-upload.yml | 53 ++++++++++++++++++++++++++ Dockerfile | 12 ++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/container-upload.yml create mode 100644 Dockerfile diff --git a/.github/workflows/container-upload.yml b/.github/workflows/container-upload.yml new file mode 100644 index 000000000..b2a5ffc4d --- /dev/null +++ b/.github/workflows/container-upload.yml @@ -0,0 +1,53 @@ +name: Build and Upload Container + +on: + # Manual trigger capability + workflow_dispatch: + + # Trigger when Dockerfile is changed + push: + branches: + - master + paths: + - 'Dockerfile' + +jobs: + build-and-push: + runs-on: ubuntu-latest + # Only upload to packages when built on master branch (not on PRs) + if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} + tags: | + type=ref,event=branch + type=sha,prefix={{branch}}- + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + +# vim:set sts=2: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..e18bcc4ec --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM alpine:latest + +# Create a timestamp file to make each build unique +RUN echo "Built at: $(date -u '+%Y-%m-%d %H:%M:%S UTC')" > /timestamp.txt && \ + cat /timestamp.txt + +# Add a simple healthcheck script +RUN echo '#!/bin/sh' > /healthcheck.sh && \ + echo 'cat /timestamp.txt' >> /healthcheck.sh && \ + chmod +x /healthcheck.sh + +CMD ["/healthcheck.sh"] From 4aed315a1982ab26b2b09d019a38d90c86dac36a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 14:05:02 +0000 Subject: [PATCH 3/5] Simplify workflow condition by removing redundant check Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com> --- .github/workflows/container-upload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container-upload.yml b/.github/workflows/container-upload.yml index b2a5ffc4d..7ccf2cbe9 100644 --- a/.github/workflows/container-upload.yml +++ b/.github/workflows/container-upload.yml @@ -15,7 +15,7 @@ jobs: build-and-push: runs-on: ubuntu-latest # Only upload to packages when built on master branch (not on PRs) - if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' + if: github.ref == 'refs/heads/master' permissions: contents: read From 98474fabc79f293db05a7da14d396cc0a2a10295 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 15:08:23 +0000 Subject: [PATCH 4/5] Build container on PRs without pushing to registry Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com> --- .github/workflows/container-upload.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/container-upload.yml b/.github/workflows/container-upload.yml index 7ccf2cbe9..3d5f8cbae 100644 --- a/.github/workflows/container-upload.yml +++ b/.github/workflows/container-upload.yml @@ -10,12 +10,15 @@ on: - master paths: - 'Dockerfile' + + # Also build on PRs to test Dockerfile changes + pull_request: + paths: + - 'Dockerfile' jobs: build-and-push: runs-on: ubuntu-latest - # Only upload to packages when built on master branch (not on PRs) - if: github.ref == 'refs/heads/master' permissions: contents: read @@ -26,6 +29,8 @@ jobs: uses: actions/checkout@v4 - name: Log in to GitHub Container Registry + # Only login when pushing (on master branch) + if: github.ref == 'refs/heads/master' uses: docker/login-action@v3 with: registry: ghcr.io @@ -46,7 +51,8 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: true + # Only push to registry on master branch, otherwise just build + push: ${{ github.ref == 'refs/heads/master' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 1d02b34c5cfe2a52db492a902029c3690cb4cb84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 20:28:28 +0000 Subject: [PATCH 5/5] Fix Docker tag format for PR builds Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com> --- .github/workflows/container-upload.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/container-upload.yml b/.github/workflows/container-upload.yml index 3d5f8cbae..c1c16ff1d 100644 --- a/.github/workflows/container-upload.yml +++ b/.github/workflows/container-upload.yml @@ -44,7 +44,9 @@ jobs: images: ghcr.io/${{ github.repository }} tags: | type=ref,event=branch - type=sha,prefix={{branch}}- + type=ref,event=pr + type=sha,prefix={{branch}}-,enable={{is_default_branch}} + type=sha type=raw,value=latest,enable={{is_default_branch}} - name: Build and push Docker image