-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add bun usage example to 04-ci-build-caching.mdx #60343
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
2 similar comments
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
@JCharante Thank you for submitting a I do think it will be better to add your |
Sure @samcx that makes sense. Would it be fair to update the comment in the next.js docs to say that examples for other package managers are available on that page instead of specifying yarn? |
@JCharante That sounds fair to me! |
path: | | ||
${{ github.workspace }}/.next/cache | ||
# Generate a new cache whenever packages or source files change. | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: does bun generates *.lockb.json ? AFAIK as I see bun only generates bun.lockb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, it's even bun.lockb
in the @JCharante 's PoC repo. I'm not sure why it's bun.lockb.json
in the PR:
https://github.com/JCharante/nextjs-github-actions-bun/blob/060cc02b8140103833081206a8e15e362b117393/.github/workflows/nextjs.yml#L22
Closing this as per this comment → #60343 (comment). |
fixes #57079
This adds how to use github actions/cache@v3 with bun by hashing bun's lockfile instead of package-lock.json or yarn.lock.
This does add a whole new paragraph of text, so it might be necessary or preferable to instead change the first example instead. I just thought it'd get messy to keep adding comments to the original code block.
I have a proof of concept for using this build step here https://github.com/JCharante/nextjs-github-actions-bun
and it can be seen in the latest build that the error message
No build cache found.
does not occur because Next.js is using the cache.