Repository navigation
Add building by specific commit SHA - #31
Conversation
The core change is the Dockerfile and clone.sh now respect a `NODE_REF` value for building by the specified commit SHA When not specified, it defaults to the head commit of the main branch of `nodejs/node`. But the main intent for this feature is so that the `nodejs/node` repo can use `repository_dispatch` to automatically trigger new builds (with a specific commit hash) after successfully executing its own daily build workflow. Signed-off-by: Ethan Arrowood <ethan@arrowood.dev>
Sends a node-daily event to the nodejs/devcontainer repo to trigger a new devcontainer build upon a successful daily build. It shares the specific associated commit so the exact devcontainer is built. Requires: nodejs/devcontainer#31 Signed-off-by: Ethan Arrowood <ethan@arrowood.dev>
|
Related to: nodejs/node#67153 |
|
I've also already created the new |
inoway46
left a comment
There was a problem hiding this comment.
Thanks for this change! One non-blocking suggestion for an edge case: since each run updates the same tags, overlapping runs could result in nightly containing arm64 and amd64 images built from different commits.
With daily builds normally running once a day, overlap seems unlikely. However, there are also weekly and manual triggers, so passing the image digests produced by each build to the merge workflow, instead of using the shared tags, would handle this case while preserving concurrent builds. This could be a follow-up PR.
| ( | ||
| cd /home/developer/nodejs/node | ||
| git init --initial-branch=main | ||
| git remote add --track main origin https://github.com/nodejs/node.git |
There was a problem hiding this comment.
Why add a origin remote when there's already an upstream pointing to the same URL? I don't think it's a good idea, origin should stay undefined, users can set it point to their fork
There was a problem hiding this comment.
Agreed; fixing now.
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sends a node-daily event to the nodejs/devcontainer repo to trigger a new devcontainer build upon a successful daily build. It shares the specific associated commit so the exact devcontainer is built. Requires: nodejs/devcontainer#31 Signed-off-by: Ethan Arrowood <ethan@arrowood.dev> PR-URL: #67153 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Tierney Cyren <hello@bnb.im>
| - name: Keep the scheduled trigger enabled | ||
| run: gh api -X PUT "repos/${GITHUB_REPOSITORY}/actions/workflows/docker-build.yml/enable" | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} |
There was a problem hiding this comment.
does github.token have access to do this? I know may workflow actions need a PAT
There was a problem hiding this comment.
It will:
Once these are both approved I'll have to update the nodejs-github-bot to have write access on nodejs/devcontainer.
Co-authored-by: Aviv Keller <me@aviv.sh>
Sends a node-daily event to the nodejs/devcontainer repo to trigger a new devcontainer build upon a successful daily build. It shares the specific associated commit so the exact devcontainer is built. Requires: nodejs/devcontainer#31 Signed-off-by: Ethan Arrowood <ethan@arrowood.dev> PR-URL: #67153 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Tierney Cyren <hello@bnb.im>
The core change is the Dockerfile and clone.sh now respect a
NODE_REFvalue for building by the specified commit SHAWhen not specified, it defaults to the head commit of the main branch of
nodejs/node.But the main intent for this feature is so that the
nodejs/noderepo can userepository_dispatchto automatically trigger new builds (with a specific commit hash) after successfully executing its own daily build workflow.This change also merges the build workflows into one file to simplify things. It switches actions to using hashes for versions too (may want to consider installing a dep updater in this repo eventually).
Finally, I added some details to the README.md too.
I will be opening a PR on
nodejs/nodetoo shortly adding therepository_dispatchcall to the daily build workflow. Once these are both approved I'll have to update thenodejs-github-botto have write access onnodejs/devcontainer.AI-assisted (Claude Opus 5.5, my setup). The words are my own, per the Human Voice policy.