Skip to content

Commit 78f04cd

Browse files
committed
Try
1 parent 347dd2b commit 78f04cd

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,31 @@ jobs:
2323
- name: Lint
2424
run: yarn lint
2525

26+
job_docker:
27+
name: Build Docker Image
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Check out current commit
31+
uses: actions/checkout@v4
32+
- name: Build Docker Image
33+
uses: docker/build-push-action@v5
34+
with:
35+
context: .
36+
push: false # Don't push to a registry, just build locally
37+
tags: ubuntu-local:latest
38+
- name: Save Docker Image as Artifact
39+
run: |
40+
docker save ubuntu-local:latest | gzip > ubuntu-local-image.tar.gz
41+
- name: Upload Docker Image Artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: ubuntu-local-docker-image
45+
path: ubuntu-local-image.tar.gz
46+
retention-days: 1
47+
2648
job_compile:
2749
name: Compile Binary (v${{ matrix.node }}) ${{ matrix.target_platform || matrix.os }}, ${{ matrix.arch || matrix.container }}, ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }}
50+
needs: [job_docker]
2851
runs-on: ${{ matrix.os }}
2952
container:
3053
image: ${{ matrix.container }}
@@ -174,13 +197,17 @@ jobs:
174197
apk add --no-cache build-base git g++ make curl python3
175198
ln -sf python3 /usr/bin/python
176199
177-
- name: Setup (Docker)
178-
if: contains(matrix.container, 'ubuntu-local')
179-
uses: docker/build-push-action@v5
200+
- name: Download Docker Image Artifact
201+
if: matrix.container == 'ubuntu-local:latest'
202+
uses: actions/download-artifact@v4
180203
with:
181-
context: .
182-
push: false # Don't push to a registry, just build locally
183-
tags: ubuntu-local:latest
204+
name: ubuntu-local-docker-image
205+
path: /tmp/
206+
207+
- name: Load Docker Image
208+
if: matrix.container == 'ubuntu-local:latest'
209+
run: |
210+
docker load < /tmp/ubuntu-local-image.tar.gz
184211
185212
- name: Check out current commit
186213
uses: actions/checkout@v4

0 commit comments

Comments
 (0)