From 38b7bb959ff9caaa2f6bfe5decaf61c47ab0d8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1a=20Tomi=C4=87?= Date: Fri, 6 Sep 2024 16:55:47 +0200 Subject: [PATCH] feat(ci): Add a manual CI job that cleans bazel caches (#890) --- .github/workflows/clean-bazel-caches.yaml | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/clean-bazel-caches.yaml diff --git a/.github/workflows/clean-bazel-caches.yaml b/.github/workflows/clean-bazel-caches.yaml new file mode 100644 index 000000000..6a6d01ea9 --- /dev/null +++ b/.github/workflows/clean-bazel-caches.yaml @@ -0,0 +1,30 @@ +name: Clean Bazel Cache +on: + workflow_dispatch: + inputs: + clean_options: + description: "Additional bazel clean options (e.g. --expunge)" + type: string + default: "" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + clean-bazel-cache: + runs-on: [self-hosted, dre-runner-custom] + strategy: + matrix: + runner: [1, 2, 3, 4] # We currently have 4 runners, adjust this number if more runners are added + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: "☁️ Setup bazelisk" + uses: bazelbuild/setup-bazelisk@v2 + + - name: Clean Bazel Cache + run: | + bazel clean ${{ inputs.clean_options }}