ci: Add workflow to bump the project template's Playwright version#2003
ci: Add workflow to bump the project template's Playwright version#2003Pijukatel wants to merge 4 commits into
Conversation
What: the cookiecutter project template's Dockerfile pins a single Playwright version that selects the Apify base image tag and the in-image playwright pin. It was bumped by hand. This adds a scheduled workflow that keeps it current. How: a daily workflow (plus manual dispatch) runs a stdlib-only helper that reads the Apify Playwright base image's Docker Hub tags, picks the highest stable version, and rewrites only the pinned-version line when a newer one is available. On a change it commits to a fixed branch and opens (or refreshes) an auto-merge pull request, reusing the repo's existing signed-commit and gh pr automation. This mirrors the template docker-image bumping used in apify/actor-templates, adding the daily self-detection it does not need there. Alternatives considered: keying off PyPI's latest playwright or the resolved lockfile version instead of the base-image tags. Both were rejected because the template references the Apify base image, so a version is only safe to pin once that image is published; the base image can lag PyPI and the lockfile tracks the pip pin rather than the image. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YT79F2ENym57Q4YXh2wRBy
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2003 +/- ##
==========================================
- Coverage 93.37% 93.33% -0.05%
==========================================
Files 179 179
Lines 12482 12482
==========================================
- Hits 11655 11650 -5
- Misses 827 832 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Drop the argument parser and make the updater a single-purpose script that runs with no arguments and hardcodes the one Dockerfile it maintains. The workflow now detects whether anything changed with a plain git diff instead of consuming step outputs, removing the machinery that carried version values between steps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YT79F2ENym57Q4YXh2wRBy
Keep the updater next to the Dockerfile it maintains, under src/crawlee/project_template/, and resolve the Dockerfile path relative to the script instead of the repository root. The workflow invokes it from its new location. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YT79F2ENym57Q4YXh2wRBy
There was a problem hiding this comment.
Pull request overview
Adds an automated mechanism to keep the cookiecutter project template’s pinned Playwright version aligned with the latest stable Apify Playwright base image tag for the template’s existing Python version.
Changes:
- Introduces a Python script that reads the template Dockerfile, discovers the latest stable
<python>-<semver>Docker Hub tag forapify/actor-python-playwright*, and updates the pinnedplaywright_versionwhen newer. - Adds a scheduled/manual GitHub Actions workflow that runs the script daily and opens/updates an auto-merge PR when a bump is needed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/crawlee/project_template/update_playwright_version.py | Implements tag discovery + Dockerfile rewrite logic for bumping the pinned Playwright version in the template. |
| .github/workflows/update_playwright_version.yaml | Schedules and automates running the bump script, committing changes, and creating/updating an auto-merge PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Description
The cookiecutter project template's Dockerfile
(
src/crawlee/project_template/{{cookiecutter.project_name}}/Dockerfile) pins a singlePlaywright version. That value selects the Apify base image tag
(
apify/actor-python-playwright*:3.13-<version>) and the in-imageplaywright==<version>pin, and it was bumped by hand. This adds automation that keeps it current, in the same
spirit as the template docker-image bumping in
apify/actor-templates.