diff --git a/.github/workflows/bakery-build-native.yml b/.github/workflows/bakery-build-native.yml index 2a564ee6..114ea044 100644 --- a/.github/workflows/bakery-build-native.yml +++ b/.github/workflows/bakery-build-native.yml @@ -188,6 +188,13 @@ jobs: echo "platform_matrix=$(echo "$result" | jq --compact-output .)" >> "$GITHUB_OUTPUT" echo "image_matrix=$(echo "$result" | jq --compact-output '[.[].image] | unique')" >> "$GITHUB_OUTPUT" + - name: Upload CDN cache + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: bakery-cdn-cache + path: /tmp/bakery_cache/ + if-no-files-found: ignore + build-test: name: "Build/Test ${{ matrix.img.image }}:${{ matrix.img.version }} (${{ matrix.img.platform }})" permissions: @@ -294,6 +301,12 @@ jobs: else echo "dev-spec=" >> "$GITHUB_OUTPUT" fi + - name: Restore CDN cache + continue-on-error: true + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: bakery-cdn-cache + path: /tmp/bakery_cache/ - name: Build env: GIT_SHA: ${{ github.sha }} @@ -474,6 +487,13 @@ jobs: echo "dev-spec=" >> "$GITHUB_OUTPUT" fi + - name: Restore CDN cache + continue-on-error: true + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: bakery-cdn-cache + path: /tmp/bakery_cache/ + - name: Publish env: GIT_SHA: ${{ github.sha }} diff --git a/.github/workflows/bakery-build-pr.yml b/.github/workflows/bakery-build-pr.yml index 16f249bc..3889f977 100644 --- a/.github/workflows/bakery-build-pr.yml +++ b/.github/workflows/bakery-build-pr.yml @@ -121,6 +121,13 @@ jobs: result=$(bakery ci matrix --quiet --dev-versions "$DEV_VERSIONS" --matrix-versions "$MATRIX_VERSIONS" --exclude platform --context "$BAKERY_CONTEXT") echo "versions_matrix=$(echo "$result" | jq --compact-output .)" >> "$GITHUB_OUTPUT" + - name: Upload CDN cache + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: bakery-cdn-cache + path: /tmp/bakery_cache/ + if-no-files-found: ignore + build-test: name: "Build/Test ${{ matrix.img.image }}:${{ matrix.img.version }} (${{ matrix.img.platform }})" needs: @@ -180,6 +187,13 @@ jobs: PLATFORM=${BUILD_PLATFORM#linux/} echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT" + - name: Restore CDN cache + continue-on-error: true + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: bakery-cdn-cache + path: /tmp/bakery_cache/ + - name: Build env: IS_FORK: ${{ needs.detect.outputs.is-fork }}