Skip to content

Commit db88dbc

Browse files
liweinanclaude
andcommitted
fix: use docker compose build instead of docker/build-push-action
Replace three docker/build-push-action steps with a single "docker compose build" command. This ensures images are tagged with Docker Compose's naming convention, so "docker compose up" finds them without rebuilding or requiring explicit --no-build. The previous approach of tagging :ci images didn't match compose's expected image names (upctl-compose-{service}). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent e861a7a commit db88dbc

2 files changed

Lines changed: 3 additions & 46 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,8 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v4
2525

26-
- name: Set up Docker Buildx
27-
uses: docker/setup-buildx-action@v3
28-
29-
- name: Cache Docker layers
30-
uses: actions/cache@v4
31-
with:
32-
path: /tmp/.buildx-cache
33-
key: ${{ runner.os }}-buildx-${{ github.sha }}
34-
restore-keys: |
35-
${{ runner.os }}-buildx-
36-
37-
- name: Build upctl-svc
38-
uses: docker/build-push-action@v6
39-
with:
40-
context: ./upctl-svc
41-
tags: upctl-svc:ci
42-
load: true
43-
cache-from: type=local,src=/tmp/.buildx-cache
44-
cache-to: type=local,dest=/tmp/.buildx-cache-new
45-
46-
- name: Build upctl-web
47-
uses: docker/build-push-action@v6
48-
with:
49-
context: ./upctl-web
50-
tags: upctl-web:ci
51-
load: true
52-
cache-from: type=local,src=/tmp/.buildx-cache
53-
cache-to: type=local,dest=/tmp/.buildx-cache-new
54-
55-
- name: Build authcore
56-
uses: docker/build-push-action@v6
57-
with:
58-
context: ./authcore
59-
tags: authcore:ci
60-
load: true
61-
cache-from: type=local,src=/tmp/.buildx-cache
62-
cache-to: type=local,dest=/tmp/.buildx-cache-new
63-
64-
- name: Move cache
65-
run: |
66-
rm -rf /tmp/.buildx-cache
67-
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
26+
- name: Build images
27+
run: docker compose build authcore upctl-svc upctl-web
6828

6929
integration:
7030
needs: build
@@ -85,7 +45,7 @@ jobs:
8545
8646
- name: Start built services
8747
run: |
88-
docker compose up -d --no-build authcore upctl-svc upctl-web
48+
docker compose up -d authcore upctl-svc upctl-web
8949
docker compose logs --tail=20 authcore upctl-svc upctl-web
9050
9151
- name: Wait for authcore (30s timeout)

‎docker-compose.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ services:
1717
retries: 10
1818

1919
authcore:
20-
image: authcore:ci
2120
build:
2221
context: ./authcore
2322
depends_on:
@@ -33,7 +32,6 @@ services:
3332
- "3000:3000"
3433

3534
upctl-svc:
36-
image: upctl-svc:ci
3735
build:
3836
context: ./upctl-svc
3937
depends_on:
@@ -49,7 +47,6 @@ services:
4947
- uploads:/app/uploads
5048

5149
upctl-web:
52-
image: upctl-web:ci
5350
build:
5451
context: ./upctl-web
5552
depends_on:

0 commit comments

Comments
 (0)