From 9ecd3750d31609d0e6d3319896c3e71659bade6a Mon Sep 17 00:00:00 2001 From: oxpa Date: Wed, 4 Sep 2024 21:59:21 +0100 Subject: [PATCH] Build and run pruner --- .github/workflows/test.yml | 13 +++++++++++++ examples/registry/s3config.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 examples/registry/s3config.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62fbd16..7993212 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,6 +49,14 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + + - name: Build code + run: | + cd cmds/docker-distribution-pruner/ + go get + go build + mv docker-distribution-pruner ../../ + cd - - name: Login to Dockerhub uses: docker/login-action@v3 @@ -126,3 +134,8 @@ jobs: tags: "localhost:5000/image:latest" outputs: type=registry,push=true,rewrite-timestamp=true target: "AB" + + + - name: Prune registry + run: | + EXPERIMENTAL=true ./docker-distribution-pruner -config examples/registry/s3config.yml diff --git a/examples/registry/s3config.yml b/examples/registry/s3config.yml new file mode 100644 index 0000000..205322d --- /dev/null +++ b/examples/registry/s3config.yml @@ -0,0 +1,31 @@ +version: 0.1 +log: + level: debug + fields: + service: registry +storage: + storage: + s3: + bucket: "testme" + v4auth: "false" + region: "generic" + regionendpoint: "http://s3mock:9090" + secure: "false" + accesskey: "123" + secretkey: "123" + redirect: + disable: "true" + delete: + enable: "true" + +http: + addr: :5000 + secret: "shared-registry-secret" + headers: + X-Content-Type-Options: [nosniff] + +health: + storagedriver: + enabled: true + interval: 10s + threshold: 3