Skip to content

Commit 25909bc

Browse files
committed
ci: fix GitHub Actions failures
1 parent 72415c6 commit 25909bc

8 files changed

Lines changed: 160 additions & 127 deletions

File tree

.github/workflows/ci-optimized.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ jobs:
101101
docker run --rm "${IMAGE_TAG}" rustc --version
102102
docker run --rm "${IMAGE_TAG}" cargo --version
103103
104+
- name: Save Docker image
105+
run: |
106+
IMAGE_TAG="terraphim-builder:${{ github.run_number }}-${{ github.sha }}"
107+
docker save "${IMAGE_TAG}" | gzip > terraphim-builder-image.tar.gz
108+
109+
- name: Upload Docker image artifact
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: terraphim-builder-image
113+
path: terraphim-builder-image.tar.gz
114+
retention-days: 1
115+
104116
lint-and-format:
105117
runs-on: ubuntu-latest
106118
needs: [setup, build-base-image]
@@ -110,6 +122,16 @@ jobs:
110122
- name: Checkout code
111123
uses: actions/checkout@v5
112124

125+
- name: Download Docker image artifact
126+
uses: actions/download-artifact@v4
127+
with:
128+
name: terraphim-builder-image
129+
path: .
130+
131+
- name: Load Docker image
132+
run: |
133+
docker load < terraphim-builder-image.tar.gz
134+
113135
- name: Run format check
114136
run: |
115137
docker run --rm \
@@ -154,6 +176,16 @@ jobs:
154176
name: frontend-dist
155177
path: frontend-dist
156178

179+
- name: Download Docker image artifact
180+
uses: actions/download-artifact@v4
181+
with:
182+
name: terraphim-builder-image
183+
path: .
184+
185+
- name: Load Docker image
186+
run: |
187+
docker load < terraphim-builder-image.tar.gz
188+
157189
- name: Build Rust project
158190
run: |
159191
# Copy frontend dist
@@ -211,6 +243,16 @@ jobs:
211243
- name: Checkout code
212244
uses: actions/checkout@v5
213245

246+
- name: Download Docker image artifact
247+
uses: actions/download-artifact@v4
248+
with:
249+
name: terraphim-builder-image
250+
path: .
251+
252+
- name: Load Docker image
253+
run: |
254+
docker load < terraphim-builder-image.tar.gz
255+
214256
- name: Run tests
215257
run: |
216258
docker run --rm \

.github/workflows/ci-simple.yml

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)