|
76 | 76 |
|
77 | 77 | package: |
78 | 78 | permissions: |
79 | | - # Upload to GitHub Release |
| 79 | + # Upload artifacts to GitHub Release |
80 | 80 | contents: write |
| 81 | + # Upload cached Docker images to GitHub Packages |
| 82 | + packages: write |
81 | 83 | name: ${{ matrix.id }} |
82 | 84 | runs-on: ${{ contains(matrix.id, 'amd64') && 'ubuntu-latest' || 'ubuntu-24.04-arm' }} |
83 | 85 | needs: check-labels |
@@ -186,12 +188,11 @@ jobs: |
186 | 188 | version="${GITHUB_REF_NAME#apache-arrow-}" |
187 | 189 | echo "ARROW_VERSION=${version}" >> "${GITHUB_ENV}" |
188 | 190 | fi |
189 | | - - name: Cache ccache |
190 | | - uses: actions/cache@v5 |
| 191 | + - name: Restore ccache |
| 192 | + uses: apache/infrastructure-actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53 |
191 | 193 | with: |
192 | | - path: ${{ env.BUILD_DIR }}/ccache |
193 | | - key: package-linux-${{ matrix.id }}-${{ hashFiles('cpp/**', 'c_glib/**') }} |
194 | | - restore-keys: package-linux-${{ matrix.id }}- |
| 194 | + path: ${{ env.BUILD_DIR }} |
| 195 | + key: package-linux-${{ matrix.id }} |
195 | 196 | - name: Install dependencies |
196 | 197 | run: | |
197 | 198 | sudo apt update |
@@ -249,16 +250,25 @@ jobs: |
249 | 250 | env: |
250 | 251 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
251 | 252 | run: | |
252 | | - rake -C dev/tasks/linux-packages docker:pull || : |
| 253 | + rake -C dev/tasks/linux-packages/apache-arrow docker:pull:${TARGET} || : |
253 | 254 | rake -C dev/tasks/linux-packages ${TASK_NAMESPACE}:build |
| 255 | + - name: Save ccache |
| 256 | + if: >- |
| 257 | + !cancelled() |
| 258 | + continue-on-error: true |
| 259 | + uses: apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53 |
| 260 | + with: |
| 261 | + path: ${{ env.BUILD_DIR }} |
| 262 | + key: package-linux-${{ matrix.id }} |
| 263 | + include-hidden-files: true |
254 | 264 | - name: Docker Push |
255 | 265 | continue-on-error: true |
256 | 266 | if: >- |
257 | 267 | success() && |
258 | 268 | github.event_name == 'push' && |
259 | 269 | github.ref_name == 'main' |
260 | 270 | run: | |
261 | | - rake -C dev/tasks/linux-packages docker:push |
| 271 | + rake -C dev/tasks/linux-packages/apache-arrow docker:push:${TARGET} |
262 | 272 | - name: Build artifact tarball |
263 | 273 | run: | |
264 | 274 | mkdir -p "${DISTRIBUTION}" |
@@ -339,7 +349,6 @@ jobs: |
339 | 349 | env: |
340 | 350 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
341 | 351 | run: | |
342 | | - rake -C dev/tasks/linux-packages docker:pull || : |
343 | 352 | # Validate reproducibility. Reprotest runs the build twice |
344 | 353 | # inside its own tempdir and doesn't copy artifacts back, |
345 | 354 | # so this is purely a verification step. |
|
0 commit comments