Skip to content

Commit 140b81d

Browse files
authored
ci: Only store playwright cache on develop (#13358)
Should reduce amount of cached data.
1 parent e3d73ca commit 140b81d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/actions/install-playwright/action.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,23 @@ runs:
1313
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
1414
shell: bash
1515

16-
- name: Cache playwright binaries
17-
uses: actions/cache@v4
16+
- name: Restore cached playwright binaries
17+
uses: actions/cache/restore@v4
1818
id: playwright-cache
1919
with:
2020
path: |
2121
~/.cache/ms-playwright
2222
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
2323

24+
# Only store cache on develop branch
25+
- name: Store cached playwright binaries
26+
uses: actions/cache/save@v4
27+
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
28+
with:
29+
path: |
30+
~/.cache/ms-playwright
31+
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
32+
2433
# We always install all browsers, if uncached
2534
- name: Install Playwright dependencies (uncached)
2635
run: npx playwright install chromium webkit firefox --with-deps

0 commit comments

Comments
 (0)