Skip to content

fix(ci): skip frozen-lockfile for dependabot PRs#40

Merged
Scetrov merged 1 commit into
mainfrom
fix-ci-dependabot-lockfile
May 9, 2026
Merged

fix(ci): skip frozen-lockfile for dependabot PRs#40
Scetrov merged 1 commit into
mainfrom
fix-ci-dependabot-lockfile

Conversation

@Scetrov
Copy link
Copy Markdown
Owner

@Scetrov Scetrov commented May 9, 2026

Problem

Dependabot updates package.json but cannot update bun.lock (it only understands package-lock.json). Every CI job uses bun install --frozen-lockfile, which fails because the lockfile doesn't match the updated package.json.

Fix

  1. Conditional frozen-lockfile: CI now skips --frozen-lockfile when the PR is from dependabot (detected via github.actor), allowing bun install to regenerate the lockfile.
  2. Auto-commit lockfile: A new step runs bun install and commits any regenerated bun.lock back to the branch for dependabot PRs. Regular PRs still get --frozen-lockfile enforcement.

Changes

  • .github/workflows/ci.yml: Added conditional install and lockfile commit step to all jobs
  • bun.lock: Already updated on the dependabot branch (pushed separately)

Already applied to dependabot branch

The lockfile update has been pushed to dependabot/npm_and_yarn/bun-dependencies-70702ba6ba so that PR #39 will pass once this PR is merged.

Copilot AI review requested due to automatic review settings May 9, 2026 19:02
@netlify
Copy link
Copy Markdown

netlify Bot commented May 9, 2026

Deploy Preview for frontier-flow ready!

Name Link
🔨 Latest commit 28b1ec9
🔍 Latest deploy log https://app.netlify.com/projects/frontier-flow/deploys/69ff84c56d397f0008f4e0a2
😎 Deploy Preview https://deploy-preview-40--frontier-flow.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 87
Accessibility: 98
Best Practices: 100
SEO: 89
PWA: 60
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the GitHub Actions CI workflow to accommodate Dependabot PRs where package.json changes can temporarily diverge from the committed Bun lockfile, by conditionally relaxing --frozen-lockfile and attempting to auto-commit a regenerated lockfile back to the Dependabot branch.

Changes:

  • Make bun install conditionally omit --frozen-lockfile for Dependabot-triggered runs.
  • Add a step in each job to regenerate and auto-commit/push bun.lock on Dependabot PRs.

Comment thread .github/workflows/ci.yml
Comment on lines +43 to +52
- name: Commit updated lockfile (dependabot)
if: github.event_name == 'pull_request' && startsWith(github.actor, 'dependabot')
run: |
bun install
git config user.name "dependabot[bot]"
git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
git add bun.lock
if ! git diff --cached --quiet; then
git commit -m "chore(deps): update bun.lock"
git push
Comment thread .github/workflows/ci.yml
Comment on lines +43 to +53
- name: Commit updated lockfile (dependabot)
if: github.event_name == 'pull_request' && startsWith(github.actor, 'dependabot')
run: |
bun install
git config user.name "dependabot[bot]"
git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
git add bun.lock
if ! git diff --cached --quiet; then
git commit -m "chore(deps): update bun.lock"
git push
fi
Comment thread .github/workflows/ci.yml
Comment on lines +41 to +44
run: bun install ${{ !startsWith(github.actor, 'dependabot') && '--frozen-lockfile' || '' }}

- name: Commit updated lockfile (dependabot)
if: github.event_name == 'pull_request' && startsWith(github.actor, 'dependabot')
@Scetrov Scetrov merged commit 9e37989 into main May 9, 2026
18 checks passed
@Scetrov Scetrov deleted the fix-ci-dependabot-lockfile branch May 9, 2026 19:07
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.

2 participants