Skip to content

Add a workflow to update to a new Ruby release on dispatch - #532

Merged
k0kubun merged 1 commit into
docker-library:masterfrom
k0kubun:update-workflow
Nov 3, 2026
Merged

k0kubun merged 1 commit into
docker-library:masterfrom
k0kubun:update-workflow

Conversation

@k0kubun

@k0kubun k0kubun commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

ref: docker-library/official-images#22616

This PR adds a workflow that allows ruby/ruby's publish.yml workflow to push an update.sh output to master. The publish.yml workflow will use matzbot's API token to trigger this workflow using workflow_dispatch.

Lets ruby/ruby's release workflow (publish.yml) trigger the same
"update.sh" + build/test + push that the Jenkins update.sh job does,
right after a release instead of up to 6 hours later:

  POST /repos/docker-library/ruby/actions/workflows/update.yml/dispatches
  {"ref": "master", "inputs": {"version": "4.0.9"}}

The "update" job waits for the version to appear in www.ruby-lang.org's
releases.yml (which "versions.sh" reads), runs "./update.sh" for the
affected versions.json keys and commits with the same message format as
the Jenkins job. The "test" job builds and tests only the changed
variants with the same matrix generator as ci.yml. The "push" job then
fast-forwards master with the workflow's own GITHUB_TOKEN.

Ruby usually releases several versions at once, so each version runs as
its own workflow run (concurrency group per version). If master moved in
the meantime (another version's run, or the Jenkins job), the push job
exits successfully when master already has the version, and otherwise
replays the tested commit on top of master, verifying that the result is
byte-identical to what was tested for the affected versions and that
"./update.sh" is a no-op on it. Anything else fails without pushing.
@k0kubun
k0kubun merged commit 52052d1 into docker-library:master Nov 3, 2026
26 checks passed
@k0kubun
k0kubun deleted the update-workflow branch November 3, 2026 17:42
k0kubun added a commit to ruby/ruby that referenced this pull request Nov 4, 2026
docker-library/ruby now has a workflow_dispatch-triggered workflow
(docker-library/ruby#532) that runs ./update.sh for a released Ruby
version, builds and tests the result, and pushes it to its master
branch. Dispatch it from publish.yml right after a release, so the
official Docker images stop waiting for the 6-hourly Jenkins job.
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