From beb0279f4e0cad38c3698171a2a868ec1bf22c59 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 19:16:33 +0000 Subject: [PATCH 1/7] Initial plan From 39d83e6448a149ce000d335846ae7774e02df591 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 19:28:26 +0000 Subject: [PATCH 2/7] Add Docker caching overlay for all services in CI workflows Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com> --- .github/workflows/on_call_build_site.yaml | 5 +- .github/workflows/on_call_staging_test.yaml | 2 +- docker-compose.ci.yml | 51 ++++++++++++++++++++- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on_call_build_site.yaml b/.github/workflows/on_call_build_site.yaml index cb6beb98..43521c5d 100644 --- a/.github/workflows/on_call_build_site.yaml +++ b/.github/workflows/on_call_build_site.yaml @@ -8,9 +8,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build the site with docker compose run: | - docker compose run --build build + docker compose -f docker-compose.yml -f docker-compose.ci.yml run --build build - name: Tarball the site run: | diff --git a/.github/workflows/on_call_staging_test.yaml b/.github/workflows/on_call_staging_test.yaml index c8dd519f..f340a2bf 100644 --- a/.github/workflows/on_call_staging_test.yaml +++ b/.github/workflows/on_call_staging_test.yaml @@ -42,7 +42,7 @@ jobs: # Run BDD integration tests using docker compose echo "## BDD Test Results" >> $GITHUB_STEP_SUMMARY echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - docker compose run test 2>&1 | tee bdd_output.txt + docker compose -f docker-compose.yml -f docker-compose.ci.yml run test 2>&1 | tee bdd_output.txt bdd_exit_code=$? cat bdd_output.txt >> $GITHUB_STEP_SUMMARY echo "\`\`\`" >> $GITHUB_STEP_SUMMARY diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 0e550648..e6b1efb9 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -1,7 +1,56 @@ services: + serve: + build: + cache_from: + - type=gha + cache_to: + - type=gha,mode=max + + dist: + build: + cache_from: + - type=gha + cache_to: + - type=gha,mode=max + + build: + build: + cache_from: + - type=gha + cache_to: + - type=gha,mode=max + staging: build: cache_from: - type=gha cache_to: - - type=gha,mode=max \ No newline at end of file + - type=gha,mode=max + + test: + build: + cache_from: + - type=gha + cache_to: + - type=gha,mode=max + + shell: + build: + cache_from: + - type=gha + cache_to: + - type=gha,mode=max + + http_serve: + build: + cache_from: + - type=gha + cache_to: + - type=gha,mode=max + + broken_links: + build: + cache_from: + - type=gha + cache_to: + - type=gha,mode=max From d0d080b356dbc9e54a9dac87692ff1724c438158 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 Aug 2025 12:15:05 +0000 Subject: [PATCH 3/7] Add Docker login for GitHub Actions cache authentication Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com> --- .github/workflows/on_call_build_site.yaml | 7 +++++++ .github/workflows/on_call_staging_test.yaml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/on_call_build_site.yaml b/.github/workflows/on_call_build_site.yaml index 43521c5d..21e36bf4 100644 --- a/.github/workflows/on_call_build_site.yaml +++ b/.github/workflows/on_call_build_site.yaml @@ -11,6 +11,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to Docker + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + - name: Build the site with docker compose run: | docker compose -f docker-compose.yml -f docker-compose.ci.yml run --build build diff --git a/.github/workflows/on_call_staging_test.yaml b/.github/workflows/on_call_staging_test.yaml index f340a2bf..9d495508 100644 --- a/.github/workflows/on_call_staging_test.yaml +++ b/.github/workflows/on_call_staging_test.yaml @@ -18,6 +18,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to Docker + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + - name: Prepare staging context run: | # Copy staging files into the _site directory for the docker build From 8ffaafe545b23f95d1f426e53506ccd914d8aab9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 Aug 2025 13:35:12 +0000 Subject: [PATCH 4/7] Add Docker environment variables for improved caching performance Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com> --- .github/workflows/on_call_build_site.yaml | 4 ++++ .github/workflows/on_call_staging_test.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/on_call_build_site.yaml b/.github/workflows/on_call_build_site.yaml index 21e36bf4..291fd5ef 100644 --- a/.github/workflows/on_call_build_site.yaml +++ b/.github/workflows/on_call_build_site.yaml @@ -5,6 +5,10 @@ on: jobs: build_site: runs-on: ubuntu-latest + env: + CACHE_IMAGE: orionrobots/orionrobots-site + DOCKER_BUILDKIT: 1 + COMPOSE_DOCKER_CLI_BUILD: 1 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/on_call_staging_test.yaml b/.github/workflows/on_call_staging_test.yaml index 9d495508..886680cb 100644 --- a/.github/workflows/on_call_staging_test.yaml +++ b/.github/workflows/on_call_staging_test.yaml @@ -5,6 +5,10 @@ on: jobs: staging_test: runs-on: ubuntu-latest + env: + CACHE_IMAGE: orionrobots/orionrobots-site + DOCKER_BUILDKIT: 1 + COMPOSE_DOCKER_CLI_BUILD: 1 steps: - uses: actions/checkout@v4 - name: Fetch site artifact From 04c2e8ff2dc4cf826d0e2f2c87c2ecf27fa06465 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 Aug 2025 14:58:39 +0000 Subject: [PATCH 5/7] Switch Docker cache from type=gha to type=registry for all services Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com> --- docker-compose.ci.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index e6b1efb9..2e24917c 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -2,55 +2,55 @@ services: serve: build: cache_from: - - type=gha + - type=registry,ref=orionrobots/orionrobots-site:cache cache_to: - - type=gha,mode=max + - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max dist: build: cache_from: - - type=gha + - type=registry,ref=orionrobots/orionrobots-site:cache cache_to: - - type=gha,mode=max + - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max build: build: cache_from: - - type=gha + - type=registry,ref=orionrobots/orionrobots-site:cache cache_to: - - type=gha,mode=max + - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max staging: build: cache_from: - - type=gha + - type=registry,ref=orionrobots/orionrobots-site:cache cache_to: - - type=gha,mode=max + - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max test: build: cache_from: - - type=gha + - type=registry,ref=orionrobots/orionrobots-site:cache cache_to: - - type=gha,mode=max + - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max shell: build: cache_from: - - type=gha + - type=registry,ref=orionrobots/orionrobots-site:cache cache_to: - - type=gha,mode=max + - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max http_serve: build: cache_from: - - type=gha + - type=registry,ref=orionrobots/orionrobots-site:cache cache_to: - - type=gha,mode=max + - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max broken_links: build: cache_from: - - type=gha + - type=registry,ref=orionrobots/orionrobots-site:cache cache_to: - - type=gha,mode=max + - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max From 53e6d8db1399f777a96e31cb60729f9d8e8a9a6f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 Aug 2025 16:33:55 +0000 Subject: [PATCH 6/7] Add packages:write permissions and use ghcr.io registry for Docker cache Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com> --- .github/workflows/on_call_build_site.yaml | 2 ++ .github/workflows/on_call_staging_test.yaml | 2 ++ docker-compose.ci.yml | 32 ++++++++++----------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/on_call_build_site.yaml b/.github/workflows/on_call_build_site.yaml index 291fd5ef..4e9cf3b8 100644 --- a/.github/workflows/on_call_build_site.yaml +++ b/.github/workflows/on_call_build_site.yaml @@ -5,6 +5,8 @@ on: jobs: build_site: runs-on: ubuntu-latest + permissions: + packages: write env: CACHE_IMAGE: orionrobots/orionrobots-site DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/on_call_staging_test.yaml b/.github/workflows/on_call_staging_test.yaml index 886680cb..9776b7b2 100644 --- a/.github/workflows/on_call_staging_test.yaml +++ b/.github/workflows/on_call_staging_test.yaml @@ -5,6 +5,8 @@ on: jobs: staging_test: runs-on: ubuntu-latest + permissions: + packages: write env: CACHE_IMAGE: orionrobots/orionrobots-site DOCKER_BUILDKIT: 1 diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 2e24917c..31f2b7b9 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -2,55 +2,55 @@ services: serve: build: cache_from: - - type=registry,ref=orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache cache_to: - - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max dist: build: cache_from: - - type=registry,ref=orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache cache_to: - - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max build: build: cache_from: - - type=registry,ref=orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache cache_to: - - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max staging: build: cache_from: - - type=registry,ref=orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache cache_to: - - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max test: build: cache_from: - - type=registry,ref=orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache cache_to: - - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max shell: build: cache_from: - - type=registry,ref=orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache cache_to: - - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max http_serve: build: cache_from: - - type=registry,ref=orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache cache_to: - - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max broken_links: build: cache_from: - - type=registry,ref=orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache cache_to: - - type=registry,ref=orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max From 015e2180c219174ecd4343c28e0b3f10b7c7c51a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 Aug 2025 18:49:51 +0000 Subject: [PATCH 7/7] Update Docker cache to use service-specific registry refs for each service Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com> --- docker-compose.ci.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 31f2b7b9..c96941e5 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -2,55 +2,55 @@ services: serve: build: cache_from: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.serve:cache cache_to: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.serve:cache,mode=max dist: build: cache_from: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.dist:cache cache_to: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.dist:cache,mode=max build: build: cache_from: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.build:cache cache_to: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.build:cache,mode=max staging: build: cache_from: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.staging:cache cache_to: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.staging:cache,mode=max test: build: cache_from: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.test:cache cache_to: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.test:cache,mode=max shell: build: cache_from: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.shell:cache cache_to: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.shell:cache,mode=max http_serve: build: cache_from: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.http_serve:cache cache_to: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.http_serve:cache,mode=max broken_links: build: cache_from: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.broken_links:cache cache_to: - - type=registry,ref=ghcr.io/orionrobots/orionrobots-site:cache,mode=max + - type=registry,ref=ghcr.io/orionrobots/orionrobots-site.broken_links:cache,mode=max