Skip to content

Commit 63995b8

Browse files
committed
Update test workflow to use docker-container driver
1 parent 45265e7 commit 63995b8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
proxy_mode: audit
3636
test_dockerfile: test/Dockerfile.audit
3737
assert_script: ./test/assert-audit-mode.sh
38-
endpoint_port: 1234
38+
builder_name: buildcage-audit
3939
- mode: restrict
4040
proxy_mode: restrict
4141
test_dockerfile: test/Dockerfile.restrict
4242
assert_script: ./test/assert-restrict-mode.sh
43-
endpoint_port: 1235
43+
builder_name: buildcage-restrict
4444

4545
name: test (${{ matrix.mode }})
4646

@@ -59,14 +59,14 @@ jobs:
5959
- name: Start containers
6060
env:
6161
PROXY_MODE: ${{ matrix.proxy_mode }}
62-
PORT: ${{ matrix.endpoint_port }}
62+
BUILDER_NAME: ${{ matrix.builder_name }}
6363
run: docker compose up -d --wait
6464

6565
- name: Set up Docker Buildx
6666
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
6767
with:
6868
driver: remote
69-
endpoint: tcp://localhost:${{ matrix.endpoint_port }}
69+
endpoint: docker-container://${{ matrix.builder_name }}
7070

7171
- name: Build test image
7272
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
@@ -84,11 +84,16 @@ jobs:
8484

8585
- name: Show logs
8686
if: always()
87+
env:
88+
BUILDER_NAME: ${{ matrix.builder_name }}
89+
INPUT_BUILDER_NAME: ${{ matrix.builder_name }}
8790
run: node report/main.mjs ./compose.yml || true
8891

8992
- name: Run assertions
9093
run: ${{ matrix.assert_script }}
9194

9295
- name: Cleanup
9396
if: always()
97+
env:
98+
BUILDER_NAME: ${{ matrix.builder_name }}
9499
run: docker compose down -v --rmi all 2>/dev/null || true

0 commit comments

Comments
 (0)