From f659cef792c0b2036e00b9aa9af3e18c2e6f193c Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Tue, 10 Dec 2024 23:06:47 +0100 Subject: [PATCH] chore: add cache for woodpecker --- .woodpecker/build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index 2f4269a..7b0673a 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -15,5 +15,9 @@ steps: privileged: true commands: - echo "$PACKAGE_TOKEN" | buildah login forge.babariviere.com --username babariviere --password-stdin - - buildah build --label org.opencontainers.image.source=https://$IMAGE_NAME -t $IMAGE_NAME:latest -t $IMAGE_NAME:$(date -u +%Y%m%d) . + - buildah build \ + --cache-from docker://$IMAGE_NAME/cache \ + --cache-to docker://$IMAGE_NAME/cache \ + --label org.opencontainers.image.source=https://$IMAGE_NAME \ + -t $IMAGE_NAME:latest -t $IMAGE_NAME:$(date -u +%Y%m%d) . - buildah push --all $IMAGE_NAME docker://$IMAGE_NAME