switch to a dedicated cache repo
Some checks failed
Podman Rootless Demo / test-backend (push) Failing after 42s
Some checks failed
Podman Rootless Demo / test-backend (push) Failing after 42s
This commit is contained in:
parent
0790b63dc3
commit
553f3e8947
1 changed files with 7 additions and 2 deletions
|
|
@ -15,6 +15,7 @@ jobs:
|
||||||
POSTGRES_IMG_DIGEST: ${{ secrets.POSTGRES_IMG_DIGEST }}
|
POSTGRES_IMG_DIGEST: ${{ secrets.POSTGRES_IMG_DIGEST }}
|
||||||
RUST_IMG_DIGEST: ${{ secrets.RUST_IMG_DIGEST }}
|
RUST_IMG_DIGEST: ${{ secrets.RUST_IMG_DIGEST }}
|
||||||
PREBUILT_BACKEND_TEST_IMAGE: ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}/sharenet-test-rust
|
PREBUILT_BACKEND_TEST_IMAGE: ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}/sharenet-test-rust
|
||||||
|
CACHE_REPO: ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}/sharenet-test-rust-cache
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
@ -59,6 +60,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# Build deps stage with layer caching
|
# Build deps stage with layer caching
|
||||||
podman --remote build \
|
podman --remote build \
|
||||||
|
--layers \
|
||||||
|
--cache-to "$CACHE_REPO" \
|
||||||
|
--cache-from "$CACHE_REPO" \
|
||||||
--target deps \
|
--target deps \
|
||||||
-f backend/Dockerfile.test-rust \
|
-f backend/Dockerfile.test-rust \
|
||||||
-t "$PREBUILT_BACKEND_TEST_IMAGE:deps-${{ steps.cache-key.outputs.cache_key }}" \
|
-t "$PREBUILT_BACKEND_TEST_IMAGE:deps-${{ steps.cache-key.outputs.cache_key }}" \
|
||||||
|
|
@ -70,11 +74,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# Build final image using cached deps
|
# Build final image using cached deps
|
||||||
podman --remote build \
|
podman --remote build \
|
||||||
|
--layers \
|
||||||
|
--cache-from "$CACHE_REPO" \
|
||||||
--target runner \
|
--target runner \
|
||||||
-f backend/Dockerfile.test-rust \
|
-f backend/Dockerfile.test-rust \
|
||||||
-t "$PREBUILT_BACKEND_TEST_IMAGE:test-${{ github.sha }}" \
|
-t "$PREBUILT_BACKEND_TEST_IMAGE:test-${{ github.sha }}" \
|
||||||
--cache-from "$PREBUILT_BACKEND_TEST_IMAGE:deps-${{ steps.cache-key.outputs.cache_key }}" \
|
.
|
||||||
--layers
|
|
||||||
|
|
||||||
- name: Start PostgreSQL
|
- name: Start PostgreSQL
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue