Skip to content

Release every 4 weeks and auto-merge passing Renovate updates - #252

Open
chrapkowski-sg wants to merge 2 commits into
scipfrom
release-and-renovate-automation
Open

chrapkowski-sg wants to merge 2 commits into
scipfrom
release-and-renovate-automation

Conversation

@chrapkowski-sg

@chrapkowski-sg chrapkowski-sg commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

scip-python ships as the sourcegraph/scip-python Docker image, but the image only gets rebuilt when someone cuts a release, so it keeps the pinned base image's outdated Alpine packages (right now OpenSSL, zlib, krb5 and libffi). A scheduled workflow now opens a patch release PR every 4 weeks on Monday, in the same weeks as scip-clang, with the version bump and a CHANGELOG entry listing the commits since the last tag. Merging any version bump to scip tags it and dispatches scip-release.yml, replacing the manual tag push; tags pushed with GITHUB_TOKEN don't trigger workflows, and npm trusted publishing still sees scip-release.yml as the publishing workflow. The image also runs apk upgrade now.

GitHub holds CI on PRs opened by Actions, so the release PR needs someone to click "Approve workflows to run" before merging; the Docker image build now also runs on package.json and lockfile changes, so that PR builds the image before anything is tagged. If the Docker push fails after npm publish, rerunning the tag workflow publishes again, because scip-release.yml now skips npm when the registry already has the version. Since a rerun can now reach the Docker push, scip-release.yml fails when the tag doesn't match package.json and only moves latest and autoindex for the newest tag, and the tag workflow rejects versions that aren't M.N.P or aren't newer than the latest tag. The CHANGELOG stays the release notes (no GitHub releases), and dev/bump_version.sh goes away since it pushed straight to the protected branch and force-pushed tags.

Renovate PRs also sit until someone merges them, even when green. Minor, patch and digest updates now merge on their own (with an explicit rule keeping majors manual, since the shared preset auto-merges some npm updates of any type), GitHub Actions updates come as one PR, and Renovate runs on Monday mornings (Europe/Warsaw). Renovate merges them itself instead of using GitHub auto-merge, so it waits for every check rather than only the required snapshot tests: the snapshot tests on Ubuntu and macOS, the Docker image build, prettier and Semgrep. That doesn't cover running the built image, CodeQL (its triggers target main, not scip), or the release-only setup-node, docker/login-action and Node version in scip-release.yml, so a bad update to those would first show up in the weekly CodeQL run or on release day. The Dependabot config goes away, since its only entry was a weekly Docker version update duplicating Renovate's base image updates; Dependabot security alerts and updates are repository settings and aren't affected.

@chrapkowski-sg

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@chrapkowski-sg
chrapkowski-sg force-pushed the release-and-renovate-automation branch 2 times, most recently from a5c0f75 to 2e83e05 Compare November 25, 2026 12:36
scip-python ships as a Docker image, so it needs regular rebuilds to pick up Alpine security fixes even when the code doesn't change. A scheduled workflow now opens a patch release PR every 4 weeks on Monday (in the same weeks as scip-clang) with the version bump and a CHANGELOG entry listing the commits since the last tag. Merging any version bump to `scip` now tags the release and starts scip-release.yml, replacing the manual tag push. Tags pushed by a workflow don't trigger other workflows, so the tag workflow dispatches the release; npm trusted publishing accepts that, since the publishing workflow is still scip-release.yml. Dockerfile.autoindex also runs `apk upgrade`, which currently picks up OpenSSL, zlib, krb5 and libffi updates the pinned base image lacks.

GitHub holds CI on PRs opened by GitHub Actions, so the release PR needs someone to select "Approve workflows to run" before it can merge. The Docker image build now also runs for package.json and lockfile changes, so release PRs build the image before they tag. A release whose Docker push fails can be published again by rerunning the tag workflow: scip-release.yml skips npm when the registry already has the version. Because a rerun can now reach the Docker push, scip-release.yml also fails when the tag doesn't match package.json and only moves `latest` and `autoindex` for the newest tag, and the tag workflow rejects versions that aren't M.N.P or aren't newer than the latest tag. When no release PR is open, a leftover release branch is replaced instead of failing the push. dev/bump_version.sh is replaced by dev/prepare_release.sh; it pushed straight to the protected branch and force-pushed tags.
Renovate PRs wait for a manual merge even when CI passes, so they pile up. Minor, patch and digest updates now merge on their own once every check passes, so only major updates and failing PRs need attention; an explicit major rule also overrides the shared preset, which auto-merges some npm updates of any type. GitHub Actions updates and the tool versions they install (mise, the release Node version) are grouped into one PR, and Renovate runs on Monday mornings to match the weekly cycle. Vulnerability fixes still bypass the schedule. The Dependabot config goes away: its only entry was a weekly Docker version update that duplicates Renovate's base image updates (and it looked for a root Dockerfile, which doesn't exist). Dependabot security alerts and updates are repository settings, so they are not affected.

Renovate merges these PRs itself instead of using GitHub auto-merge, because GitHub would only wait for the required snapshot tests, while Renovate also waits for the Docker image build, prettier and Semgrep. That covers checkout, mise, cache, the Docker build actions and the base image build, but not running the built image, CodeQL (its triggers target `main`, not `scip`), or the release-only setup-node, docker/login-action and Node version in scip-release.yml. A bad update to those would first show up in the weekly CodeQL run or on release day.
@chrapkowski-sg
chrapkowski-sg force-pushed the release-and-renovate-automation branch from 2e83e05 to 92d3f56 Compare November 25, 2026 12:43
@chrapkowski-sg
chrapkowski-sg marked this pull request as ready for review November 25, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant