Repository navigation
CI: move the Joomla versions of the matrix into tests/ci/matrix.json - #247
Merged
Merged
Conversation
The joomla-versions workflow can't push its version bump: a push made with a
workflow's GITHUB_TOKEN is refused if it changes a file under
.github/workflows ("refusing to allow a GitHub App to create or update
workflow ... without `workflows` permission"), and that token can't be given
the permission. The bump edited the matrix in ci.yml.
The matrix is now a data file, tests/ci/matrix.json. ci.yml reads it in a
first job ("Test matrix") and the integration job takes it from there; names
of the integration jobs are unchanged. The version bot (joomla-updates.php)
and the checksum lint read and write the JSON, so the bot's commit only
touches matrix.json and joomla-checksums.sha256.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhhhdjhErC9ZiaS4HyRjsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
joomla-versionsworkflow could not push its version bump:A push made with a workflow's
GITHUB_TOKENis refused if it changes any file under.github/workflows/, and that token can't be given theworkflowspermission. The bump edited the Joomla versions in the matrix ofci.yml.Change
The matrix is a data file,
tests/ci/matrix.json, instead of part of the workflow file:ci.yml: a first job "Test matrix" reads the file (jq) and the integration job uses it (needs: matrix,matrix: ${{ fromJson(...) }}). The integration job names (Joomla 5.4.8, mysql:8.0, PHP 8.2, ...) and the combinations are unchanged.tests/ci/joomla-updates.php(plan/apply) andtests/lint/check-joomla-checksums.phpread and write the JSON. The lint also checks the file's structure (valid JSON, non-emptyinclude,joomla/php/dbstrings, versions look like versions, checksum present).joomla-versions.ymlandtests/README.mdupdated (also says: use "Run workflow", not "Re-run", to run the current workflow file).The bot's commit now only touches
tests/ci/matrix.jsonandtests/ci/joomla-checksums.sha256: no secret, no token that can change workflows.Tested
JoomlaUpdatesTest(16 tests; a new one covers unusable matrix files, which found and fixed a warning for{"include": "x"}; the apply test now checks that nothing but the version changes, formatting included).plan+applyon the realmatrix.jsonwith a synthetic release list (5.4.8 -> 5.4.10, 6.1.3 -> 6.1.4, new line 6.2), then thejqof the matrix job on the result and the lint.runblocks ofjoomla-versions.ymlagainst a throwaway git remote with a fakegh/curl: the commit contains exactly those two files, the branch is pushed, PR/issue/CI dispatch requested.:problem in the newrun:line, fixed).The jobs of this PR are the first real run of the new "Test matrix" job.
After merging
Run "Joomla versions" from the Actions tab (Run workflow, branch
main): it should now push the branch and open a PR for 5.4.10 / 6.1.4. The 6.2 issue (#246) exists already and won't be duplicated.Generated by Claude Code