You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by po...@apache.org on 2026/10/24 10:46:28 UTC
(magpie-site) branch main updated: Keep the Playwright apt cache inside the workspace (#249)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/magpie-site.git
The following commit(s) were added to refs/heads/main by this push:
new fb5bd75 Keep the Playwright apt cache inside the workspace (#249)
fb5bd75 is described below
commit fb5bd755c74158f4ebf8689e6cf16975a0fa7d4d
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sat Oct 24 12:46:22 2026 +0200
Keep the Playwright apt cache inside the workspace (#249)
actions/cache refuses a path with '..', so #247's ../apt-cache/*.deb saved
nothing ("Relative pathing '.' and '..' is not allowed"). Inside the
workspace is the same relative place on the container and on ubuntu-slim,
and a relative path is the same literal, and so the same cache version, on
both.
Generated-by: Claude Opus 5
---
.github/actions/playwright-chromium/action.yml | 13 +++++++------
.gitignore | 3 +++
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/.github/actions/playwright-chromium/action.yml b/.github/actions/playwright-chromium/action.yml
index 55df94a..ffca4fe 100644
--- a/.github/actions/playwright-chromium/action.yml
+++ b/.github/actions/playwright-chromium/action.yml
@@ -43,15 +43,16 @@ runs:
# actions/cache stores paths relative to the workspace, and the cache job's
# container lays out its home and workspace differently from ubuntu-slim:
# a cache of ~/apt-cache saved there unpacks somewhere else on the shards.
- # Next to the workspace is the same relative place on both. The path is
- # also part of the cache's version, so it is written the same way, as a
- # literal, in both steps below.
+ # Inside the workspace is the same relative place on both; actions/cache
+ # refuses a path with `..`, so it cannot sit beside it. The path is also
+ # part of the cache's version, so it is written the same way, as a
+ # relative literal, in both steps below. .gitignore lists the directory.
- name: Keep apt's downloads for the cache
id: apt-cache
shell: bash
run: |
sudo=$(command -v sudo || true)
- cache="${GITHUB_WORKSPACE}/../apt-cache"
+ cache="${GITHUB_WORKSPACE}/.apt-cache"
mkdir -p "${cache}/partial"
${sudo} rm -f /etc/apt/apt.conf.d/docker-clean
echo "Dir::Cache::Archives \"${cache}\";" | ${sudo} tee /etc/apt/apt.conf.d/99playwright-cache
@@ -61,7 +62,7 @@ runs:
- id: restore
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
- path: ../apt-cache/*.deb
+ path: .apt-cache/*.deb
key: playwright-apt-${{ steps.apt-cache.outputs.os }}-${{ steps.apt-cache.outputs.week }}
restore-keys: playwright-apt-${{ steps.apt-cache.outputs.os }}-
- shell: bash
@@ -72,5 +73,5 @@ runs:
- if: inputs.save == 'true' && steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
- path: ../apt-cache/*.deb
+ path: .apt-cache/*.deb
key: ${{ steps.restore.outputs.cache-primary-key }}
diff --git a/.gitignore b/.gitignore
index 915d7eb..192235f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,9 @@ src/data/tools.json
# dependencies
node_modules/
+# Playwright's apt downloads in CI (.github/actions/playwright-chromium)
+.apt-cache/
+
# logs
npm-debug.log*
yarn-debug.log*