Skip to content

IBX-11778: Added composite actions for metapackage Create Tag workflows - #105

Draft
alongosz wants to merge 6 commits into
mainfrom
ibx-11778-metapackage-composite-actions
Draft

IBX-11778: Added composite actions for metapackage Create Tag workflows#105
alongosz wants to merge 6 commits into
mainfrom
ibx-11778-metapackage-composite-actions

Conversation

@alongosz

@alongosz alongosz commented Jul 22, 2026

Copy link
Copy Markdown
Member
🎫 Issue IBX-11778

Related PRs:

Description:

The auto_tag.yml (Create Tag) workflows in the metapackage repositories (oss, headless, experience, commerce) are ~90% identical copies. This PR adds two composite actions extracting the common logic, so each workflow keeps only its edition-specific data (see the related PRs, which shrink each workflow to 40–60 lines):

actions/check-composer-package — checks that a package version is available in a Composer repository: Packagist by default, or a Satis instance via repository-url + basic auth. With retry: true it re-checks on a configurable retry-schedule (the default reproduces the commerce Satis wait: 30/60/120 s ramp-up, then 5 × 300 s, ~28.5 min worst case). It replaces both preparation-phase patterns used so far:

  • the GitHub-tag existence probe (oss/headless) — a flawed proxy, since a tag can exist while the package is not yet installable (e.g. ibexa/headless-assets is served by Satis, which is rebuilt by a 5-minute cron), and
  • the inline Satis wait loop (commerce).

actions/create-metapackage-tag — the whole tagging job: fetches releases/<version>/release.json from the release repository (input, default ibexa/release-maker), derives minimum stability from the version suffix, pins the parent/assets packages (pin-packages input), patches the require versions from the release definition, updates composer.lock, and — behind real-op — commits, tags and pushes using a GitHub App token via gh auth setup-git.

Implementation notes:

  • Shell logic lives in .bash scripts next to each action.yml (the composer-install convention) and receives inputs via the environment — no ${{ }} interpolation inside scripts.
  • The sponge/moreutils dependency of the original steps is dropped (tmpfile + mv), removing an apt-get install from every run.
  • Third-party actions are SHA-pinned with version comments.
  • A new CI workflow runs the bats test suites (30 tests, stubbing curl/sleep/gh/git/composer via PATH) and actionlint (version- and checksum-pinned) on pull requests and pushes to main.

For QA:

No manual QA required at this stage. The actions are exercised end-to-end by the related metapackage PRs, which temporarily point their uses: references at this branch ([TMP] commits) — the Create Tag dry-run dispatches (real_op: false) there validate this PR before it is merged.

Documentation:

No documentation required.

🤖 Generated with Claude Code

alongosz and others added 2 commits July 22, 2026 16:20
The auto_tag.yml workflows in the metapackage repositories (oss, headless,
experience, commerce) are ~90% identical copies. These two composite actions
extract the common logic so each workflow keeps only its edition-specific
data (which parent/assets packages to check and pin):

- check-composer-package asserts that a package version is available in a
  Composer repository (Packagist by default, or Satis via repository-url and
  basic auth), optionally re-checking on a retry schedule. It replaces both
  the GitHub-tag existence probe (a flawed proxy: the tag can exist while
  the package is not yet installable) and the Satis wait loop.
- create-metapackage-tag covers the whole tagging job: fetching the
  release.json definition from the release repository, deriving minimum
  stability, pinning parent packages, patching require versions, updating
  composer.lock, and (behind real-op) committing, tagging and pushing with
  a GitHub App token.

Shell logic lives in .bash files that receive inputs via the environment
instead of workflow-expression interpolation. The sponge/moreutils
dependency of the original steps is dropped in favour of tmpfile+mv.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The bats suites stub the external commands (curl, sleep, gh, git, composer)
on PATH and use the real jq, covering the retry semantics of
check-composer-package and the composer.json transformations of
create-metapackage-tag. The new CI workflow runs bats and actionlint
(pinned by version and checksum) on pushes to main and pull requests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
alongosz and others added 2 commits July 22, 2026 17:04
- Redirected the check-composer-package error annotation to stderr;
- Added an explicit default case to the stability switch and dropped the
  command-in-variable indirection (also replacing echo|cut with a plain
  parameter expansion);
- Suppressed the unpredictable-dependency-versions rule on composer
  update: regenerating the lock file is the purpose of the action.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Enforced HTTPS on the actionlint download redirect;
- Disabled the actionlint shellcheck integration for now — the
  pre-existing workflows are not shellcheck-clean — and added a dedicated
  shellcheck job covering the action scripts instead;
- Added explicit returns to the bats helper functions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@alongosz alongosz left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remarks for Claude-Code:

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread actions/check-composer-package/action.yml Outdated
Comment thread actions/create-metapackage-tag/action.yml Outdated
alongosz and others added 2 commits July 28, 2026 15:33
- Documented the private-packages repository URL next to the default;
- Dropped the NOSONAR suppression on composer update — the finding is
  handled as a false positive in SonarCloud instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Switched the CI jobs to the ubuntu-26.04 runner used across the
  repositories, instead of ubuntu-latest;
- Bumped actionlint from 1.7.7 to 1.7.12 (latest);
- Added .github/actionlint.yaml declaring ubuntu-26.04, which actionlint's
  built-in runner label list does not know yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant