Skip to content

Commit 576fc3d

Browse files
committed
ci: fix docker image loading by using docker run instead of job containers
1 parent 1644cc2 commit 576fc3d

1 file changed

Lines changed: 26 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,28 +114,32 @@ jobs:
114114
needs: [check-changes, build-ci-image]
115115
if: needs.check-changes.outputs.source-changed == 'true'
116116
timeout-minutes: 30
117-
container:
118-
image: cutile-ci:${{ github.sha }}
119117
strategy:
120118
fail-fast: false
121119
matrix:
122120
python-version: ["3.10", "3.11", "3.12", "3.13"]
123121
steps:
124-
- name: Load CI image
122+
- name: Checkout repository
123+
uses: actions/checkout@v6
124+
125+
- name: Download CI image
125126
uses: actions/download-artifact@v5
126127
with:
127128
name: ci-image
128-
- run: docker load < cutile-ci-image.tar.gz
129129

130-
- name: Checkout repository
131-
uses: actions/checkout@v6
130+
- name: Load CI image
131+
run: docker load < cutile-ci-image.tar.gz
132132

133133
- name: Build wheel
134134
timeout-minutes: 15
135135
run: |
136-
python${{ matrix.python-version }} -m venv .venv
137-
.venv/bin/pip install --upgrade pip build wheel setuptools
138-
.venv/bin/python -m build --wheel --outdir dist/
136+
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace \
137+
cutile-ci:${{ github.sha }} \
138+
bash -c "
139+
python${{ matrix.python-version }} -m venv .venv
140+
.venv/bin/pip install --upgrade pip build wheel setuptools
141+
.venv/bin/python -m build --wheel --outdir dist/
142+
"
139143
140144
- name: Upload wheel artifact
141145
uses: actions/upload-artifact@v5
@@ -150,33 +154,34 @@ jobs:
150154
needs: [check-changes, build-ci-image, build-wheel]
151155
if: always() && (needs.check-changes.outputs.source-changed == 'true' || needs.check-changes.outputs.docs-changed == 'true')
152156
timeout-minutes: 15
153-
container:
154-
image: cutile-ci:${{ github.sha }}
155157
steps:
156-
- name: Load CI image
158+
- name: Checkout repository
159+
uses: actions/checkout@v6
160+
161+
- name: Download CI image
157162
uses: actions/download-artifact@v5
158163
with:
159164
name: ci-image
160-
- run: docker load < cutile-ci-image.tar.gz
161165

162-
- name: Checkout repository
163-
uses: actions/checkout@v6
166+
- name: Load CI image
167+
run: docker load < cutile-ci-image.tar.gz
164168

165169
- name: Download wheel artifact
166170
uses: actions/download-artifact@v5
167171
with:
168172
name: wheel-linux-x86_64-py3.10
169173
path: dist/
170174

171-
- name: Install dependencies
172-
run: |
173-
pip install dist/*.whl
174-
175175
- name: Build documentation
176176
timeout-minutes: 10
177177
run: |
178-
cd docs
179-
timeout 8m make html
178+
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace \
179+
cutile-ci:${{ github.sha }} \
180+
bash -c "
181+
pip install dist/*.whl
182+
cd docs
183+
timeout 8m make html
184+
"
180185
181186
- name: Upload documentation artifact
182187
uses: actions/upload-artifact@v5

0 commit comments

Comments
 (0)