Skip to content

⬆️ chore: Move the Workflows to the Current Major Actions, Publish on Any Build Input and Keep latest on Main's Newest Image - #205

Merged
danny-avila merged 4 commits into
mainfrom
pr/actions-majors
Oct 28, 2026
Merged

danny-avila merged 4 commits into
mainfrom
pr/actions-majors

Conversation

@danny-avila

@danny-avila danny-avila commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request Template

⚠️ Before Submitting a PR, Please Review:

  • Please ensure that you have thoroughly read and understood the Contributing Docs before submitting your Pull Request.

⚠️ Documentation Updates Notice:

  • Kindly note that documentation updates are managed in this repository: librechat.ai

Summary

Current major actions. Both workflows now use the current major of every action they call. This covers the five open Dependabot bumps (#127, #130, #133, #134, #136), plus docker/login-action v4, which Dependabot didn't propose.

Action Before After Breaking changes that touch this repo
actions/checkout v6 (CI), v4 (publish) v7 None: dependency bumps
docker/setup-qemu-action v3 v4 Node 24 runtime
docker/setup-buildx-action v3 v4 Node 24 runtime; removed deprecated inputs and outputs, none of which are used here
docker/login-action v3 v4 Node 24 runtime
docker/metadata-action v5 v6 Node 24 runtime
docker/build-push-action v6 v7 Node 24 runtime; removed DOCKER_BUILD_NO_SUMMARY, DOCKER_BUILD_EXPORT_RETENTION_DAYS and the legacy export-build tool, none of which are used here

Node 24 needs Actions Runner 2.327.1 or later, which GitHub-hosted ubuntu-latest runners already have. oven-sh/setup-bun stays on v2, its current major.

latest stays on main's newest image. The publish workflow had no concurrency group. So when two pushes to main built at once, whichever build finished last set latest, even if it was the older commit. One run, for #189's merge, sat in "Build and push" for over an hour (publish runs usually take 6 to 7 minutes) while the run for #194's merge started after it and finished first. Had the older run finished, latest would have gone back to #189's image.

  • Runs on the same ref now take turns (concurrency.group: ${{ github.workflow }}-${{ github.ref }}). Releases run under their tag's ref, so they never wait on main.
  • queue: max keeps every pending run (up to GitHub's 100), not just the newest one. Each commit on main still gets its own sha image, as before; nothing is cancelled.
  • GitHub starts queued runs in the order they began waiting, which it doesn't guarantee matches commit order. So the queue alone can't keep latest right. A new step, "Check whether main's head still builds this image", fetches main and tags latest only when the run's commit is an ancestor of main's head and no later commit changed the Docker build context. The build context is every tracked file except what .dockerignore drops: e2e/, scripts/, top-level *.md and .env.example. The step checks it with git log --full-history <commit>..<head> -- <context>, using matching :(exclude) pathspecs.
    • A newer commit that changes the build context queues its own run, and that run moves latest forward.
    • A run that GitHub starts out of order sees the later commit and leaves latest alone. That includes a later commit that reverts the context to this commit's tree. The image would be built from the same files, but its org.opencontainers.image.revision label would name the older commit.
    • It checks for later context changes rather than comparing commit ids, because an e2e-only or docs-only merge starts no publish run. If one lands while an image build is queued (as 🧪 fix: Delete the USER Profile the Config Shell Spec Creates and Unbreak the Live Profiles and Import Specs #201 did today, right after 🫥 fix: Remove the Focus Line Across the Top of Select Popovers #200), a plain "is this commit the head?" check would leave latest on the image before.
    • The whole build context is checked, not a list of "relevant" files, because the Dockerfile builds with COPY . .. If .dockerignore later changes and the step isn't updated, the step only gets stricter (some extra builds); it never tags the wrong image.
    • If git log fails, the step treats it as a change and doesn't tag latest.
    • The checkout now fetches full history (fetch-depth: 0, about 100 commits). .git is in .dockerignore, so the build context is unchanged.
    • Releases and other refs never tag latest, as with {{is_default_branch}} before.

The push trigger now covers the whole build context. It listed src/**, server.ts, package.json, bun.lock, the Dockerfile and this workflow. But the image also depends on .npmrc, patches/ and tools/ (copied before bun install), and on public/, vite.config.ts and tsconfig.json (used by vite build). A commit that touched only those published nothing. The trigger is now paths-ignore with the same four entries the head check excludes, so a push runs unless it changes only files .dockerignore drops. GitHub's * doesn't cross /, so '*.md' matches top-level Markdown only, as .dockerignore's *.md does. The cost is that a change to, say, ci.yml or the ESLint config now publishes an image too.

  • The trade-off: during a burst of merges, the builds now run one after another, so latest reaches the newest commit only once the queue drains (about 7 minutes per queued run), not as soon as the last build finishes.
  • timeout-minutes: 30 on the build job, about four times a normal run, stops a hung build from holding that queue for GitHub's default 6 hours.

The 10 open Dependabot PRs can be closed once this merges. The five npm ones (#128, #129, #131, #132, #135) are already covered on main by #189 and #194, which moved those packages past the versions they propose.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings

… Images in Push Order

Both workflows now use the current major of every action they call:
actions/checkout v7 (CI was on v6, the publish workflow on v4),
docker/setup-qemu-action v4, docker/setup-buildx-action v4,
docker/login-action v4, docker/metadata-action v6 and
docker/build-push-action v7. Each docker major moves the action to the
Node 24 runtime, which GitHub-hosted runners already provide, and drops
inputs, outputs and env vars this workflow doesn't use. This covers the
five open Dependabot bumps and login-action v4, which Dependabot didn't
propose.

The publish workflow had no concurrency group, so two pushes to main built
at the same time and whichever finished last tagged `latest`. Runs on the
same ref now queue behind each other, so `latest` always ends on the newest
commit, and a 30 minute job timeout keeps a hung build (one sat in "Build
and push" for over an hour after the click-ui upgrade merged, against a
usual 6 to 7 minutes) from holding that queue for GitHub's default 6 hours.
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 1. Head: 4f8a7f7

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T10:35:57.026555Z 9ecd46d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f8a7f739d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docker-publish.yml
Comment thread .github/workflows/docker-publish.yml
@danny-avila danny-avila changed the title ⬆️ chore: Move the Workflows to the Current Major Actions and Publish Images in Push Order ⬆️ chore: Move the Workflows to the Current Major Actions and Keep latest on Main's Newest Image Oct 28, 2026
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 2. Head: 7b72326

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b72326274

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docker-publish.yml Outdated
@danny-avila danny-avila changed the title ⬆️ chore: Move the Workflows to the Current Major Actions and Keep latest on Main's Newest Image ⬆️ chore: Move the Workflows to the Current Major Actions, Publish on Any Build Input and Keep latest on Main's Newest Image Oct 28, 2026
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 3. Head: 78e5722

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78e5722231

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/docker-publish.yml Outdated
@danny-avila

Copy link
Copy Markdown
Contributor Author

@codex review

Pass 4. Head: 9ecd46d

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 9ecd46d3d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila
danny-avila merged commit c2ab7c5 into main Oct 28, 2026
3 checks passed
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