diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d4afe3d4818e..cff6a4e9354bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,7 @@ jobs: CCACHE_BASEDIR: ${{ github.workspace }} CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_MAXSIZE: 500M + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: fail-fast: false matrix: @@ -86,6 +87,18 @@ jobs: name: mpv-${{ matrix.target }} path: mpv-git-*.zip + - name: Cleanup + run: | + gh extension install actions/gh-actions-cache + keys=$(gh actions-cache list --key ${{ matrix.target }}- -R ${{ github.repository }} -B ${{ github.ref }} | cut -f 1) + set +e + echo "Deleting caches..." + for key in $keys + do + echo $key + gh actions-cache delete $key -R ${{ github.repository }} -B ${{ github.ref }} --confirm + done + win32: runs-on: windows-latest env: @@ -98,6 +111,7 @@ jobs: CCACHE_BASEDIR: ${{ github.workspace }} CCACHE_DIR: "${{ github.workspace }}\\.ccache" CCACHE_MAXSIZE: 500M + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Disable autocrlf run: | @@ -171,6 +185,18 @@ jobs: build/vulkan-*.dll !build/mpv.lib + - name: Cleanup + run: | + gh extension install actions/gh-actions-cache + keys=$(gh actions-cache list -k x86_64-windows-msvc- -R ${{ github.repository }} -B ${{ github.ref }} | cut -f 1) + set +e + echo "Deleting caches..." + for key in $keys + do + echo $key + gh actions-cache delete $key -R ${{ github.repository }} -B ${{ github.ref }} --confirm + done + macos: runs-on: ${{ matrix.os }} strategy: