blob: 339385fe55263a4abdb53b7602e112aeda6dcc66 [file]
name: Clear expensive caches to prevent unbound growth
on:
schedule:
# Run every Sunday at 10 AM UTC (2 AM PDT)
- cron: 0 10 * * SUN
# manual
workflow_dispatch:
jobs:
bazel-repository-cache:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Clear Bazel repository cache ${{ runner.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # v3.2.4
with:
path: ${{ github.workspace }}/${{ steps.output.outputs.repository-cache }}
key: repository-cache-${{ github.ref_name }}-${{ runner.os }}-reset-${{ github.sha }}
- run: |
mkdir -p '${{ github.workspace }}/.repository-cache'
touch '${{ github.workspace }}/.repository-cache/reset_file'