Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Commit 09252ad

Browse files
committed
update workflow
1 parent c315397 commit 09252ad

1 file changed

Lines changed: 24 additions & 20 deletions

File tree

.github/workflows/build.yml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build and Test
22

33
on:
44
push:
@@ -8,16 +8,14 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
99

1010
jobs:
11-
build:
11+
build-image:
12+
name: Preapre builder image
1213
runs-on: ubuntu-latest
1314
permissions:
1415
contents: read
1516
packages: write
1617
steps:
1718
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v4
19-
with:
20-
node-version-file: ".nvmrc"
2119
- uses: docker/setup-qemu-action@v3
2220
- uses: docker/setup-buildx-action@v3
2321
- uses: docker/login-action@v3
@@ -28,38 +26,44 @@ jobs:
2826
- uses: docker/metadata-action@v5
2927
id: meta
3028
with:
31-
images: |
32-
ghcr.io/${{ github.repository }}/builder
29+
images: ghcr.io/${{ github.repository }}/builder
3330
tags: |
3431
type=raw,value=latest
3532
type=ref,event=branch
3633
type=ref,event=pr
3734
type=semver,pattern={{version}}
3835
type=semver,pattern={{major}}.{{minor}}
3936
type=sha
40-
- name: Cache source archive
41-
uses: actions/cache@v4
42-
with:
43-
path: |
44-
cache
45-
prefix
46-
wasm-build
47-
key: archive-${{ github.sha }}
48-
restore-keys: |
49-
archive-
5037
- name: Fix permissions
51-
run: |
52-
sudo chmod 777 . cache
38+
run: sudo chmod 777 . cache
5339
- name: Prepare container
5440
uses: docker/build-push-action@v5
5541
with:
56-
# load: true
5742
cache-from: type=gha
5843
cache-to: type=gha,mode=max
5944
tags: ${{ steps.meta.outputs.tags }}
6045
labels: ${{ steps.meta.outputs.labels }}
6146
push: true
6247
pull: true
48+
build:
49+
name: Build and test
50+
runs-on: ubuntu-latest
51+
needs: build-image
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: actions/setup-node@v4
55+
with:
56+
node-version-file: ".nvmrc"
57+
- name: Cache source archive
58+
uses: actions/cache@v4
59+
with:
60+
path: |
61+
cache
62+
prefix
63+
wasm-build
64+
key: archive-${{ github.sha }}
65+
restore-keys: |
66+
archive-
6367
- name: Build
6468
run: docker compose up ci
6569
- name: Test

0 commit comments

Comments
 (0)