diff --git a/.woodpecker.yml b/.woodpecker.yml index 706c517..2229146 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -7,7 +7,7 @@ pipeline: endpoint: ${S3_ENDPOINT} access_key: ${S3_USER} secret_key: ${S3_PASSWORD} - root: fej_build-cache + root: fej-build-cache restore: true secrets: [ s3_endpoint, s3_user, s3_password ] @@ -53,18 +53,15 @@ pipeline: - cargo test - # =====REBUILD CACHE===== + # =====REBUILD & FLUSH CACHE===== rebuild-cache: image: plugins/s3-cache endpoint: ${S3_ENDPOINT} access_key: ${S3_USER} secret_key: ${S3_PASSWORD} - root: fej_build-cache + root: fej-build-cache rebuild: true - flush: true - # Delete cache older than 30 days (might lower this) - flush_age: 30 mount: - target - web/node_modules @@ -74,6 +71,22 @@ pipeline: when: status: [ success, failure ] + flush-cache: + image: plugins/s3-cache + + endpoint: ${S3_ENDPOINT} + access_key: ${S3_USER} + secret_key: ${S3_PASSWORD} + root: fej-build-cache + flush: true + # Delete cache older than 30 days (might lower this) + flush_age: 30 + + secrets: [ s3_endpoint, s3_user, s3_password ] + # Push the cache, even on failure + when: + status: [ success, failure ] + # publish-builder: # image: plugins/docker