Skip to content

Commit bc6ddd3

Browse files
authored
Merge pull request #50 from OpenCSGs/feat/gh-workflow-public-runner-matrix
ci: run docker build on ubuntu-latest (public) runners
2 parents 4bffa45 + 2e7bfdf commit bc6ddd3

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: Docker Image CI
22

3-
# Storage-optimized build:
4-
# 1. Split multi-arch into per-platform matrix jobs so each self-hosted
5-
# runner only handles one architecture (halves per-runner disk peak).
6-
# 2. Enable GitHub Actions layer cache (type=gha) so yarn/poetry/apt layers
7-
# are reused on rebuilds instead of being re-fetched.
8-
# 3. Prune stale docker images/buildkit cache before each build.
3+
# Storage-optimized multi-arch build on GitHub-hosted runners:
4+
# 1. Build amd64 and arm64 in parallel matrix jobs so each runner handles
5+
# only one architecture (each fresh VM gets its own 14GB SSD)
6+
# 2. Reuse heavy yarn/poetry/apt layers via GHA layer cache (cloud-backed)
7+
# 3. Final job merges per-platform images into a single multi-arch tag
98

109
on:
1110
push:
@@ -15,7 +14,7 @@ on:
1514
jobs:
1615
build:
1716
name: build ${{ matrix.platform }}
18-
runs-on: [self-hosted]
17+
runs-on: ubuntu-latest
1918
strategy:
2019
fail-fast: false
2120
matrix:
@@ -26,11 +25,6 @@ jobs:
2625
suffix: arm64
2726

2827
steps:
29-
- name: Prune docker resources to free disk
30-
run: |
31-
docker system prune -af || true
32-
docker builder prune -af || true
33-
3428
- name: Checkout repository
3529
uses: actions/checkout@v4
3630
with:
@@ -72,7 +66,7 @@ jobs:
7266
manifest:
7367
name: merge multi-arch manifest
7468
needs: build
75-
runs-on: [self-hosted]
69+
runs-on: ubuntu-latest
7670

7771
steps:
7872
- name: Set up Docker Buildx

0 commit comments

Comments
 (0)