Skip to content

Add automated Magento/MageOS version update workflow - #64

Merged
peterjaap merged 2 commits into
mainfrom
copilot/add-github-action-for-mageos-updates
Apr 3, 2026
Merged

peterjaap merged 2 commits into
mainfrom
copilot/add-github-action-for-mageos-updates

Conversation

Copilot AI commented Apr 3, 2026 •

Copy link
Copy Markdown
Contributor

New upstream releases were detected but required manual YAML edits and a hand-crafted PR. This automates the full cycle: detect → update → open PR.

scripts/update_versions.py

New Python script (ruamel.yaml) that modifies both version registries in one shot:

  • internal/lib/config/versions.yaml (embedded in binary)
  • lib/templates/config/versions.yaml (user-overridable)

Key behaviours:

  • PHP compat inference — copies from same major.minor.patch entry, falls back to a static map (2.4.8.x → ["8.4","8.3","8.2"], etc.)
  • MageOS base version inference — same major.minor series → GitHub release notes → latest known Magento version
  • Label hygiene — promotes new entry to (Latest) / default: true, demotes old one
  • Idempotent — silently skips already-known versions
# Single distribution
python3 scripts/update_versions.py --mageos 2.2.1
python3 scripts/update_versions.py --magento 2.4.8-p5

# Both at once, with explicit base override
python3 scripts/update_versions.py --magento 2.4.8-p5 --mageos 2.2.1 --base 2.4.8

.github/workflows/auto-update-versions.yml

Scheduled workflow (Mon 10:00 UTC, after version-check.yml) plus workflow_dispatch with optional manual overrides.

Steps:

  1. Detect — queries magento/magento2 and mage-os/mageos-magento2 tags via GitHub API, diffs against the YAML registry
  2. Resolve base — Python-parses the YAML for same-minor base; falls back to release notes then latest known version
  3. Update — calls update_versions.py with resolved args
  4. PR — creates auto-update-versions/<versions> branch and opens a PR labelled auto-update; no-ops if an open PR for that branch already exists

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • github.com (HTTP Only)
    • Triggering command: /usr/bin/ssh /usr/bin/ssh -o SendEnv=GIT_PROTOCOL [email protected] git-upload-pack &#39;org/repo.git&#39; HEAD (packet block)
  • nonexistent.invalid.host
    • Triggering command: /tmp/go-build2975933279/b368/teamserver.test /tmp/go-build2975933279/b368/teamserver.test -test.testlogfile=/tmp/go-build2975933279/b368/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 3/x64=/_/GOROOT (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 3, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add GitHub action to auto update Magebox with new releases Add automated Magento/MageOS version update workflow Apr 3, 2026
Copilot AI requested a review from peterjaap April 3, 2026 14:56
@peterjaap
peterjaap marked this pull request as ready for review April 3, 2026 15:03
@peterjaap
peterjaap merged commit 3d20da5 into main Apr 3, 2026
10 checks passed
@peterjaap
peterjaap deleted the copilot/add-github-action-for-mageos-updates branch April 3, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New upstream Magento/MageOS releases detected

2 participants