Skip to content

Commit 11ea8ca

Browse files
committed
Try to use MinIO as cache with crediential pass by env_file.
1 parent d8ac4fc commit 11ea8ca

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.woodpecker/docker.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ steps:
1515
commands:
1616
- git describe --tags | tee .tag
1717

18+
- name: credential
19+
image: python:3.12
20+
commands:
21+
- echo AWS_ACCESS_KEY_ID=$${AWS_ACCESS_KEY_ID} >> .env
22+
- echo AWS_SECRET_ACCESS_KEY=$${AWS_SECRET_ACCESS_KEY} >> .env
23+
- cat .env
24+
environment:
25+
AWS_ACCESS_KEY_ID:
26+
from_secret: minio_access_key
27+
AWS_SECRET_ACCESS_KEY:
28+
from_secret: minio_secret_key
29+
1830
- name: docker
1931
image: woodpeckerci/plugin-docker-buildx:6-insecure
2032
settings:
@@ -24,6 +36,10 @@ steps:
2436
from_secret: gitea_package
2537
registry: git.kclab.cloud
2638
tags_file: .tag
39+
cache-to: type=s3,bucket=cache-53030,region=local,endpoint_url=https://s3.kclab.cloud,prefix=${CI_REPO}/docker/,mode=max
40+
cache-from:
41+
- type=s3\\,bucket=cache-53030\\,region=local\\,endpoint_url=https://s3.kclab.cloud\\,prefix=${CI_REPO}/docker/
42+
env_file: .env
2743
buildkit_config: |
2844
[registry."docker.io"]
2945
mirrors = ["https://docker.mirrors.kclab.cloud/"]

0 commit comments

Comments
 (0)