From 5f2cd259a06dee9c7cba359526ac1367ff72352c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Mon, 19 Dec 2022 12:01:46 +0100 Subject: [PATCH] Clean up snapshot cache on master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rūdolfs Ošiņš --- .github/workflows/check-e2e.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/check-e2e.yml b/.github/workflows/check-e2e.yml index 98cf00a66..36072c27b 100644 --- a/.github/workflows/check-e2e.yml +++ b/.github/workflows/check-e2e.yml @@ -18,6 +18,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Evict playwright snapshot cache when pushing to master + run: | + if [ ${{ matrix.browser }} = "visual" ] && [ ${{ github.ref }} = "refs/heads/master" ]; then + echo "Deleting ${{ runner.os }}-snapshots cache" + gh extension install actions/gh-actions-cache + gh actions-cache delete ${{ runner.os }}-snapshots --confirm || true + echo "Done" + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/setup-node@v3 with: node-version: "18.12.1"