From 511f44fd9b15678dff704304b73a63f5f5eac9f8 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Mon, 23 Feb 2026 12:44:59 +0200 Subject: [PATCH 1/3] remove dispatch for docker builds --- .github/workflows/docker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d3a77f294..9a81f4571 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,7 +1,6 @@ name: Docker Multi Platform Builds on: - workflow_dispatch: push: branches: - 'main' From 1227e8e2138e520c7ea9432a040657a4762192a5 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Mon, 23 Feb 2026 12:45:08 +0200 Subject: [PATCH 2/3] add ghcr cleanup dry run --- .github/workflows/ghcr_cleanup.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ghcr_cleanup.yml diff --git a/.github/workflows/ghcr_cleanup.yml b/.github/workflows/ghcr_cleanup.yml new file mode 100644 index 000000000..88f0bdd00 --- /dev/null +++ b/.github/workflows/ghcr_cleanup.yml @@ -0,0 +1,41 @@ +name: Docker Multi Platform Builds + +on: + workflow_dispatch: + push: + branches: + - 'main' + tags: + - 'v*.*.*' + pull_request: + branches: + - 'main' + +env: + DOCKERHUB_IMAGE: ${{ 'oceanprotocol/ocean-node' }} + GHCR_IMAGE: ${{ 'ghcr.io/oceanprotocol/ocean-node' }} + +jobs: + ghcr_cleanup: + runs-on: ubuntu-latest + steps: + - name: Login to GitHub Container Registry + id: ghcr_login + env: + GHCR_PUSH_TOKEN: ${{ secrets.GHCR_PUSH_TOKEN }} + if: env.GHCR_PUSH_TOKEN != '' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_PUSH_TOKEN }} + - name: 'Clean up docker images' + if: steps.ghcr_login.outcome == 'success' + uses: dataaxiom/ghcr-cleanup-action@v1 + with: + token: ${{ secrets.GHCR_PUSH_TOKEN }} + dry-run: true + exclude-tags: latest,main,v* + older-than: 1 day + delete-untagged: true + delete-partial-images: true From 842079caa94952d5fa6f05621ee0910f7d47e3dd Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Mon, 23 Feb 2026 13:07:51 +0200 Subject: [PATCH 3/3] prod version only as dispatch --- .github/workflows/ghcr_cleanup.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ghcr_cleanup.yml b/.github/workflows/ghcr_cleanup.yml index 88f0bdd00..3a9997be9 100644 --- a/.github/workflows/ghcr_cleanup.yml +++ b/.github/workflows/ghcr_cleanup.yml @@ -1,15 +1,7 @@ -name: Docker Multi Platform Builds +name: GHCR cleanup on: workflow_dispatch: - push: - branches: - - 'main' - tags: - - 'v*.*.*' - pull_request: - branches: - - 'main' env: DOCKERHUB_IMAGE: ${{ 'oceanprotocol/ocean-node' }} @@ -34,8 +26,7 @@ jobs: uses: dataaxiom/ghcr-cleanup-action@v1 with: token: ${{ secrets.GHCR_PUSH_TOKEN }} - dry-run: true exclude-tags: latest,main,v* - older-than: 1 day + older-than: 1 month delete-untagged: true delete-partial-images: true